How chandu2307/python_fast_api works
Project type and purpose
• This is a Python-based full-stack web application implementing a Hospital Management System (HMS) API using FastAPI.
• Its primary purpose is to provide RESTful endpoints for user authentication (JWT), patient management, appointments, medical records, billing, inventory, room/bed management, staff management, and reporting.
File structure
• Top-level directories:
• hospital_management/backend – contains the FastAPI app
• hospital_management/frontend – static HTML/CSS/JS assets
• Core backend files and directories:
• hospital_app.py – entry point mounting routers and middleware
• auth.py – JWT authentication logic (login, signup, logout, token handling)
• database.py – database connection and ORM engine setup
• models.py – ORM model definitions (User, Patient, Doctor, Appointment, etc.)
• schemas.py – Pydantic schemas for request and response validation
• routes/ – grouped route modules (e.g., admin.py for admin-only APIs)
• utils.py – shared helper functions (e.g., password hashing, token creation)
• Frontend:
• home.html – static landing page or minimal UI
• media/ – static assets (images, CSS, JS)
• Other files:
• requirement.txt – lists Python dependencies (FastAPI, Pydantic, SQLAlchemy, JWT library)
README for additional insights
• The README enumerates all API modules and endpoints the HMS plans to support.
• Confirms use of JWT-based login/signup and role-based operations (doctor, nurse, admin, patient).