Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/chatmodes/plan.chatmode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
description: Generate an implementation plan only. No code edits or file changes.
# Keep the tools read-only: do NOT include edit/apply tools.
tools: ['codebase', 'search', 'githubRepo', 'usages', 'findTestFiles', 'fetch']
# Optionally pin a model you like, or omit to use the current picker:
# model: GPT-5 mini
---

# Planning mode instructions

You are operating in **Planning Mode**. Your job is to research the codebase and produce a clear, actionable implementation plan in Markdown. **Do not** edit files, create files, run commands, or apply changes.

## Output format (Markdown)
- **Summary** – what we’re building/changing and why
- **Assumptions & constraints**
- **Design** – key components, data model, interfaces, error handling
- **Implementation steps** – numbered, incremental PR-sized chunks
- **Impacts** – files likely touched, cross-cutting concerns
- **Testing plan** – unit/integration/e2e, fixtures, edge cases
- **Rollout & guardrails** – feature flags, monitoring, rollback
- **Open questions** – call out unknowns & follow-ups

## Guardrails
- Decline to apply edits or run tools that modify the workspace.
- Prefer references to existing files/lines over large code dumps.
- Include granular acceptance criteria for each step.
68 changes: 0 additions & 68 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,71 +1,3 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# SQLite databases
*.db
*.sqlite
Expand Down
187 changes: 154 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,174 @@
# Python 3.12 Development Container
# Bootcamp Day 1 - Monorepo Project

This project provides a VS Code development container with Python 3.12, Node.js, SQLite, and UV package manager using Microsoft's official Python devcontainer image.
A modern full-stack application with FastAPI backend and React frontend, designed for learning modern web development practices.

## Project Structure

```
.
├── backend/ # FastAPI service
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main.py # FastAPI application
│ │ └── routes/ # API endpoints
│ │ ├── __init__.py
│ │ ├── health.py # Health check endpoint
│ │ └── upload.py # File upload endpoint
│ ├── pyproject.toml # Python dependencies (uv)
│ └── README.md # Backend documentation
├── frontend/ # React application (placeholder)
│ └── README.md # Frontend documentation
├── note-day1.md # Lab instructions
├── note-day2.md # Additional notes
└── README.md # This file
```

## Features

- **Python 3.12** (Microsoft's official devcontainer image)
- **Node.js** (latest LTS via devcontainer features)
- **SQLite** database (via devcontainer features)
- **UV** package manager for fast Python package management
- **GitHub Copilot** integration
- **Port forwarding** for common development ports (3000, 5173, 8000)
### Backend (FastAPI)
- ✅ **Health Check**: `GET /api/health` - Service health monitoring
- 📁 **File Upload**: `POST /api/upload` - Multi-file upload with metadata
- 📚 **Interactive Docs**: Swagger UI and ReDoc documentation
- 🚀 **Modern Tools**: uv for dependency management, automatic reload
- 🌐 **CORS Ready**: Configured for frontend integration

## Architecture
### Frontend (Planned)
- ⚛️ **React + Vite**: Modern development experience
- 🎨 **Tailwind CSS**: Utility-first styling
- 🧩 **shadcn/ui**: Beautiful, accessible components
- 📤 **File Upload UI**: Drag-and-drop interface with progress tracking

This devcontainer uses:
- **Base Image**: `mcr.microsoft.com/devcontainers/python:1-3.12-bookworm`
- **Features**:
- Node.js LTS (via `ghcr.io/devcontainers/features/node:1`)
- SQLite (via `ghcr.io/warrenbuckley/codespace-features/sqlite:1`)
- **Post-Create Setup**: UV package manager installation
## Quick Start

## Getting Started
### Backend Setup

1. Open this project in VS Code
2. Install the "Dev Containers" extension if you haven't already
3. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac) and select "Dev Containers: Reopen in Container"
4. Wait for the container to build and start
1. **Navigate to backend directory:**
```bash
cd backend
```

## Available Tools
2. **Install uv** (if not already installed):
```bash
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

### Python Package Management with UV
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```

UV is a fast Python package installer and resolver. Here are some common commands:
3. **Install dependencies:**
```bash
uv sync
```

```bash
# Install packages
uv pip install package_name
4. **Start the development server:**
```bash
uv run dev
```

5. **Access the API:**
- API: http://localhost:8000
- Documentation: http://localhost:8000/docs
- Health check: http://localhost:8000/api/health

# Install from requirements.txt
uv pip install -r requirements.txt
### Frontend Setup

# Create a virtual environment
uv venv
The frontend is currently a placeholder. Follow the instructions in `note-day1.md` to implement the React application.

# Activate virtual environment
source .venv/bin/activate
## API Endpoints

| Method | Endpoint | Description | Status |
|--------|---------------|--------------------------------|---------|
| GET | `/` | Root endpoint with API info | ✅ |
| GET | `/api/health` | Health check | ✅ |
| POST | `/api/upload` | File upload (multipart) | ✅ |
| GET | `/docs` | Swagger UI documentation | ✅ |
| GET | `/redoc` | ReDoc documentation | ✅ |

## Development Workflow

1. **Backend Development:**
```bash
cd backend
uv run dev # Starts with auto-reload
```

2. **Frontend Development:** (to be implemented)
```bash
cd frontend
npm run dev # Will start Vite dev server
```

3. **Full Stack Testing:**
- Backend: http://localhost:8000
- Frontend: http://localhost:3000 or http://localhost:5173

## Testing the Upload Endpoint

### Using curl:
```bash
curl -X POST "http://localhost:8000/api/upload" \
-H "Content-Type: multipart/form-data" \
-F "files=@path/to/your/file.jpg"
```

### SQLite
### Using the Swagger UI:
1. Go to http://localhost:8000/docs
2. Find the `/api/upload` endpoint
3. Click "Try it out"
4. Choose files to upload
5. Click "Execute"

## Technology Stack

### Backend
- **FastAPI**: Modern, fast web framework for APIs
- **uvicorn**: ASGI server for FastAPI
- **python-multipart**: File upload support
- **uv**: Ultra-fast Python package manager

### Frontend (Planned)
- **React**: UI library
- **Vite**: Build tool and dev server
- **Tailwind CSS**: Utility-first CSS framework
- **shadcn/ui**: Component library
- **axios**: HTTP client for API calls

## Next Steps

1. ✅ Backend FastAPI service with health and upload endpoints
2. 🔄 Frontend React application setup
3. 🔄 File upload UI with progress tracking
4. 🔄 Error handling and validation
5. 🔄 Testing and documentation

## Contributing

This project is part of a bootcamp curriculum. Follow the lab instructions in `note-day1.md` for guided development.

## Troubleshooting

### Backend Issues
- **Port 8000 in use**: Stop other services or change port in the command
- **Import errors**: Ensure you're in the `backend/` directory and ran `uv sync`
- **uv not found**: Install uv following the instructions above

### CORS Issues
- The backend is configured for `localhost:3000` and `localhost:5173`
- Modify CORS settings in `backend/app/main.py` if using different ports

For detailed troubleshooting, see `backend/README.md`.

---

## Original Development Container Info

This workspace is set up with:
- **Python 3.12** development container
- **Node.js** and **SQLite** via devcontainer features
- **UV** package manager for fast Python package management
- **GitHub Copilot** integration
- **Port forwarding** for development (3000, 5173, 8000)

SQLite is pre-installed and ready to use:

Expand Down
33 changes: 33 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Virtual environments
.venv/
venv/
env/
ENV/

# Environment variables
.env
.env.local
.env.*.local

# IDE
.vscode/
.idea/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# FastAPI specific
*.log

# Package managers
*.egg-info/
dist/
build/
Loading