This repository is configured for seamless deployment on multiple platforms.
-
Install Vercel CLI (optional, for local testing):
npm install -g vercel
-
Deploy to Vercel:
# Login to Vercel vercel login # Deploy vercel
-
Or use the Vercel Dashboard:
- Go to vercel.com
- Import your GitHub repository
- Vercel will automatically detect the
vercel.jsonconfiguration - Click "Deploy"
- Frontend:
index.html- Interactive dashboard - API Endpoints:
GET /api/health- Health checkGET /api/status- Repository statusGET /api/lessons- List all lessonsGET /api/run?script=<name>- Run Python scripts
# Install Vercel CLI
npm install -g vercel
# Run locally
vercel devVisit http://localhost:3000 to test.
The repository includes a CI/CD workflow that:
- Tests on Python 3.9, 3.10, 3.11, 3.12
- Runs linting with flake8
- Checks formatting with black
- Executes tests with pytest
- Verifies Vercel deployment readiness
- Push to
mainormasterbranch - Pull requests
- Manual trigger via GitHub Actions UI
Create a Dockerfile:
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8000
CMD ["python", "-m", "http.server", "8000"]- Connect your GitHub repository
- Set build command:
echo "No build needed" - Set publish directory:
/ - Add serverless functions in
api/directory
- Create new Web Service
- Connect GitHub repository
- Build Command:
pip install -r requirements.txt - Start Command:
python -m http.server $PORT
├── api/ # Vercel serverless functions
│ └── __init__.py # API endpoints
├── .github/workflows/ # GitHub Actions CI/CD
│ └── python-package.yml
├── 01-basics/ # Lesson modules
├── 02-data-types/
├── ...
├── projects/ # Example projects
├── index.html # Frontend dashboard
├── vercel.json # Vercel configuration
├── requirements.txt # Python dependencies
└── README.md # Documentation
- All Python scripts run without errors
- Tests pass (
pytest) - Code is formatted (
black .) -
vercel.jsonis properly configured - API endpoints are tested locally
- Environment variables are set (if needed)
After deploying to Vercel:
- Visit your deployed URL
- Test all API endpoints via the dashboard
- Share your deployment link!
Set these in Vercel dashboard if needed:
SECRET_KEY- For API securityDATABASE_URI- For database connectionsJWT_SECRET_KEY- For JWT authentication
For issues or questions:
- Check the README.md
- Review CONTRIBUTING.md
- Open an issue on GitHub