How tech0-swat/linkfastapinext_practical works
Project type and purpose
• This is a full-stack CRUD application built with a FastAPI backend and a Next.js/React frontend.
• Purpose: manage “customers” (create, read, update, delete) via a web UI that communicates with a REST API.
File structure
• Top-level:
• backend/ – Python FastAPI service + db_control module (CRUD, models, SQLite/MySQL adapters).
• frontend/ – Next.js 13 app directory with React components under src/app, plus config files (package.json, tsconfig/jsconfig, tailwind.config).
• Patterns:
• Frontend follows Next.js file-based routing (pages under customers/create, customers/read/[id], etc.).
• Backend uses a layered approach: app.py (FastAPI endpoints) → db_control/connect, create_tables, crud, mymodels → database (CRM.db or MySQL).
• Deployment configs: uvicorn for backend; npm run dev for frontend.
README for additional insights
• Confirms two stand-alone services:
• backend: virtualenv, pip install, uvicorn app:app --reload
• frontend: npm install, npm run dev
• Base URL: http://localhost:3000/customers
Detail
• Optional MySQL adapter path vs. default SQLite path.