./start-dev.shThis script will:
- Set up Python virtual environment (if needed)
- Install backend dependencies
- Start FastAPI backend on port 8000
- Start Next.js frontend on port 3000
Visit:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Press Ctrl+C to stop both servers.
cd backend
# First time only
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Every time
source venv/bin/activate
uvicorn main:app --reload --port 8000cd frontend
# First time only
npm install
# Every time
npm run dev./test-api.shThis will verify that:
- Backend is running
- All API endpoints are responding
- Data is being returned correctly
- FastAPI REST API
- Markdown blog post parsing
- Image serving
- Tag filtering
- CORS enabled for frontend
- Next.js 14+ App Router
- TypeScript
- Responsive design
- Blog post listing
- Individual post pages
- Tag filtering
- Static pages (About, Code, Where Is Will)
# Make sure Python 3 is installed
python3 --version
# Create fresh virtual environment
cd backend
rm -rf venv
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt# Clear Next.js cache and reinstall
cd frontend
rm -rf .next node_modules
npm install
npm run dev# Kill process on port 8000 (backend)
lsof -ti:8000 | xargs kill -9
# Kill process on port 3000 (frontend)
lsof -ti:3000 | xargs kill -9- Explore the API: Visit http://localhost:8000/docs
- Browse the blog: Visit http://localhost:3000
- Add a blog post: Create a new directory in
backend/content/posts/ - Deploy: See
DEPLOYMENT.mdfor Vercel deployment
README-MIGRATION.md- Migration overviewDEPLOYMENT.md- Deployment to VercelMIGRATION-SUMMARY.md- What was changed
Check the logs:
- Backend logs: In the terminal where you ran
uvicorn - Frontend logs: In the terminal where you ran
npm run dev
Common commands:
# Backend logs in detail
cd backend && source venv/bin/activate && uvicorn main:app --reload --log-level debug
# Frontend build errors
cd frontend && npm run build
# Test API endpoints
curl http://localhost:8000/api/posts
curl http://localhost:8000/api/tagsSee DEPLOYMENT.md for step-by-step Vercel deployment instructions.
# Quick deploy to Vercel
npm i -g vercel
vercel login
vercel --prodThat's it! Happy coding! 🎉