A Flask-based web API utilizing SQLAlchemy for database management and JWT Tokens for user authentication.
- User Authentication: Secure login/logout functionality.
- Database Integration: SQLAlchemy ORM for seamless interactions.
- Security Measures: CSRF protection, session management, and encryption.
- Python 3.12.8 (recommended)
- Podman with PostgreSQL image:
podman pull docker.io/postgres
-
Clone the Repository:
git clone https://github.com/Gabbar-v7/Sylvan.git cd Sylvan
-
Create a Virtual Environment:
python -m venv env
-
Activate the Virtual Environment:
- Windows:
env\Scripts\activate
- Mac/Linux:
source env/bin/activate
- Windows:
-
Install Dependencies:
- Windows:
pip install -r requirements-win.txt
- Mac/Linux:
pip install -r requirements-linux.txt
-
Set Up Configuration Files:
env.development
– Contains sensitive information such as API keys and database credentials.config.ini
– Stores general configuration settings.
-
Run PostgreSQL via Podman:
podman run -d \ --name sylvan-db \ -e POSTGRES_USER=username \ -e POSTGRES_PASSWORD=password \ -e POSTGRES_DB=database_name \ -v /absolute/path:/var/lib/postgresql/data \ -p 5432:5432 \ postgres
-
Start the Application:
python main.py
-
Access the API:
- Open your browser and visit:
http://127.0.0.1:5000
- Open your browser and visit:
To containerize the project using Podman, follow these steps:
-
Build the Container Image: Create a container specific configuration
container.ini
. Refer docs/config.inipodman build -t sylvan-backend .
-
Run the Application in a Container:
podman run -p 5000:5000 --env-file env.development sylvan-backend:latest
-
Verify Running Containers:
podman ps
-
Access the Application:
- Visit
http://127.0.0.1:5000
- Visit
For detailed Podman setup, refer to Podman Setup
.
Root/
├── src/
│ ├── dbModels/
│ ├── flasky/
│ ├── security/
│ └── utils/
├── scripts/
├── settings/
├── temp/
├── docs/
├── Containerfile
├── .containerignore
├── .gitignore
├── README.md
├── LICENSE
├── main.py
└── requirements.txt
-
Fork the Repository:
git fork https://github.com/Gabbar-v7/Sylvan.git
-
Create a Feature Branch:
git checkout -b feature/your-feature-name
-
Commit Your Changes:
git commit -m "Your concise commit message"
-
Push the Branch:
git push origin feature/your-feature-name
-
Submit a Pull Request on GitHub.
This project is licensed under the MIT License.
For issues or feature requests, open a new Issue.