18. Full-Stack AI App Project

Chapter 18 of 18 · 15 min

This capstone consolidates skills from the entire course. The project deliverables demonstrate production-ready development practices. Each deliverable has specific requirements and acceptance criteria.

Project Requirements

Build a document Q&A application with the following components:

1. Model Serving Layer

  • Deploy llama.cpp or vLLM server
  • Expose /completion and /embeddings endpoints
  • Health check that verifies model loads
  • Document startup time and memory usage

2. Backend API (FastAPI)

  • POST /api/v1/upload - Upload PDF with progress tracking
  • GET /api/v1/documents - List user documents
  • GET /api/v1/documents/{id} - Get document status
  • POST /api/v1/ask - Stream question response
  • GET /api/v1/history - Get conversation history
  • Authentication with JWT
  • Input validation with Pydantic
  • Structured logging with trace IDs

3. Frontend (React)

  • Document upload with drag-drop and progress
  • Document list with status indicators
  • Chat interface with streaming responses
  • Conversation history panel
  • Error handling with retry actions

4. Infrastructure

  • Docker Compose file with all services
  • Health checks and dependencies
  • Resource limits on all containers
  • Secrets management

5. CI/CD Pipeline

  • GitHub Actions workflow
  • Lint, test, build stages
  • Docker image push to registry
  • Deployment to staging on merge

6. Monitoring

  • Prometheus metrics endpoint
  • Grafana dashboard JSON
  • Alert rules for latency, errors, queue

Acceptance Criteria

The project must pass these checks:

  1. Functional test: Upload a PDF, ask a question, receive an answer
  2. Load test: Handle 10 concurrent users without errors
  3. Security scan: Zero high-severity vulnerabilities in ZAP scan
  4. Documentation: README, API docs, user guide, runbook
  5. Monitoring: Dashboards show real metrics, alerts fire on test

Submission Format

ai-doc-qa/
├── backend/
│   ├── app/
│   ├── tests/
│   ├── Dockerfile
│   └── requirements.txt
├── frontend/
│   ├── src/
│   ├── Dockerfile
│   └── package.json
├── model-server/
│   ├── Dockerfile
│   └── start.sh
├── docker-compose.yml
├── prometheus.yml
├── grafana/
│   └── dashboards/
│       └── ai-app.json
├── nginx/
│   └── nginx.conf
├── docs/
│   ├── README.md
│   ├── api.md
│   ├── user-guide.md
│   └── runbook.md
├── k6/
│   └── load_test.js
└── .github/
    └── workflows/
        └── ci-cd.yml

Evaluation Rubric

Category Points Criteria
Code Quality 20 Clean structure, type hints, tests
Architecture 20 Clear separation, documented decisions
Deployment 20 Docker setup, CI/CD pipeline
Monitoring 15 Metrics, dashboards, alerting
Security 15 Input validation, auth, secrets
Documentation 10 Complete, accurate, usable

Next Steps

After completing the capstone:

  1. Add features: document summarization, multi-modal support, multi-user workspaces
  2. Optimize performance: caching embeddings, model quantization tuning
  3. Scale infrastructure: Kubernetes migration, multi-region deployment
  4. Improve reliability: chaos engineering, automated failover

The application serves as a foundation. Real production systems evolve based on user feedback and operational experience. Ship early, measure everything, iterate constantly.

EXERCISE

Complete the project and run the acceptance tests. Deploy to a public cloud provider and share the URL with the course community.