How justlugoo/leadsmanager works
Project type and purpose
• This is a full-stack CRM-style application (“Leads Manager”) with:
• A RESTful API backend (FastAPI, SQLAlchemy, Pydantic)
• A modern SPA frontend (React + TypeScript + Vite)
• JWT-based authentication and role-based protected routes
• A relational database (SQLite in dev, pluggable to Postgres/MySQL)
File structure
• Top-level
• .github/workflows/deploy-gcp.yml – CI/CD pipeline
• docker-compose.yml – multi-container orchestration (frontend + backend)
• Makefile – common tasks
• Backend (backend-lm/)
• src/main.py – application entry point
• src/routers/ – API endpoints grouped by domain (users, leads)
• src/services/ – business logic layer
• src/models/ – SQLAlchemy ORM definitions
• src/schemas/ – Pydantic request/response models
• src/database/ – DB connection and session management
• utils/security.py – JWT generation/verification, password hashing
• Frontend (frontend-lm/)
• src/App.tsx + src/routes/ – route configuration (React Router)
• src/pages/ – top-level pages (Auth, Dashboard, Leads, Profile)
• src/components/ – reusable UI, layout, auth, leads modules
• src/services/api.ts – Axios HTTP client
• src/services/leads/ – API wrappers for leads endpoints
• src/context/UserContext.tsx + src/hooks/useAuth.ts – authentication state
README for additional insights
• Confirms layered architecture: routers → services → models/schemas → database
• Lists key endpoints and authentication flows
• Describes frontend features: protected routes, JWT in localStorage
• Technology stack: FastAPI, React, Tailwind, Vite, Axios, SQLAlchemy, Pydantic