node_modules/package.json
venv/requirements.txt
python3 -m venv venvWindows (PowerShell or CMD):
.\venv\Scripts\activateMac / Linux:
source venv/bin/activateNote for Windows PowerShell Users:
If you get an error stating that running scripts is disabled (UnauthorizedAccess / Execution Policy error), run this command once to allow scripts for your user account:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserThen try the activate command again.
| Task | Command |
|---|---|
| Create env | python -m venv venv |
| Activate env | .\venv\Scripts\activate |
| Install package | pip install fastapi |
| Save deps | pip freeze > requirements.txt |
| Install deps | pip install -r requirements.txt |
| Run FastAPI | uvicorn app.main:app --reload |
flowchart TD
A[Angular UI] -->|HTTP Request| B(FastAPI Backend)
B -->|Database Query| C[(PostgreSQL Database)]
flowchart TD
A[FastAPI starts] --> B[SQLAlchemy connects]
B --> C[Tables created]
C --> D((Server listens for requests))
flowchart TD
A([Browser Request]) --> B[FastAPI Route]
B --> C[Depends get_db]
C --> D[Session Created]
D --> E[ORM Query]
E --> F[psycopg2 sends SQL]
F --> G[(PostgreSQL responds)]
G --> H([JSON returned])