This project is a Todo App that uses SQLAlchemy for ORM & FastAPI for the backend API, with Angular for the front end. It's designed to run in a Dockerized environment for easy setup and deployment.
- Backend: FastAPI, SQLAlchemy
- Frontend: Angular
- Database: (Specify your database, e.g., PostgreSQL, SQLite)
- Containerization: Docker
This project runs in a Dockerized environment, so there's no need to manually install Python or Node.js. The Docker environment is configured with:
- Python: 3.11.10
- Node.js: 18.x.x
For local development or debugging outside Docker, ensure you have compatible versions installed.
-
Clone the repository:
git clone <repository-url> cd <project-directory>
-
Create a
.envfile in the root directory of the back-end source code with the following content:ENVIRONMENT=development # Use 'production' for production environment SERVER_INTERFACE=127.0.0.1 # Use '0.0.0.0' to allow external access
-
Build and run the Docker containers:
docker compose build docker compose up -d
-
Access the application at http://localhost:4200
- Create a Python virtual environment:
- Windows:
python -m venv .venv - Unix or MacOS:
python3 -m venv .venv
- Windows:
- Activate the virtual environment:
- Windows:
.venv\Scripts\Activate.ps1 - Unix or MacOS:
source .venv/bin/activate
- Windows:
- Install dependencies:
pip install -r requirements.txt
- Run the FastAPI server:
fastapi dev main.py
- Navigate to the frontend directory
- Install npm packages:
npm install
- Start the Angular development server:
npm run start
- Access the application at http://localhost:4200
- Navigate to the root directory of the front-end source code
- Run the test command:
npm run test