Gabbar-v7 / Sylvan

Sylvan is a scalable and secure Flask API template featuring modular Blueprints, SQLAlchemy ORM, encryption, and real-time chat. Optimized for performance.

Repository from Github https://github.comGabbar-v7/SylvanRepository from Github https://github.comGabbar-v7/Sylvan

Sylvan Backend

A Flask-based web API utilizing SQLAlchemy for database management and JWT Tokens for user authentication.

Features

  • User Authentication: Secure login/logout functionality.
  • Database Integration: SQLAlchemy ORM for seamless interactions.
  • Security Measures: CSRF protection, session management, and encryption.

Getting Started

Prerequisites

  • Python 3.12.8 (recommended)
  • Podman with PostgreSQL image:
    podman pull docker.io/postgres

Installation

  1. Clone the Repository:

    git clone https://github.com/Gabbar-v7/Sylvan.git
    cd Sylvan
  2. Create a Virtual Environment:

    python -m venv env
  3. Activate the Virtual Environment:

    • Windows:
      env\Scripts\activate
    • Mac/Linux:
      source env/bin/activate
  4. Install Dependencies:

    pip install -r requirements.txt
  5. Set Up Configuration Files:

    • env.development – Contains sensitive information such as API keys and database credentials.
    • config.ini – Stores general configuration settings.
  6. 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
  7. Start the Application:

    python main.py
  8. Access the API:

    • Open your browser and visit: http://127.0.0.1:5000

Podman Configuration

To containerize the project using Podman, follow these steps:

  1. Build the Container Image:

    podman build -t sylvan-backend .
  2. Run the Application in a Container:

    podman run -d --name sylvan-backend -p 5000:5000 sylvan-backend
  3. Verify Running Containers:

    podman ps
  4. Access the Application:

For detailed Podman setup, refer to Podman Setup.


File Structure

Root/
├── src/
│   ├── dbModels/
│   ├── flasky/
│   ├── security/
│   └── utils/
├── scripts/
├── settings/
├── temp/
├── docs/
│   ├── env-config.md
│   ├── config-ini.md
│   ├── podman-setup.md
├── Containerfile
├── .containerignore
├── .gitignore
├── README.md
├── LICENSE
├── main.py
├── requirements.txt

Contributing

  1. Fork the Repository:

    git fork https://github.com/Gabbar-v7/Sylvan.git
  2. Create a Feature Branch:

    git checkout -b feature/your-feature-name
  3. Commit Your Changes:

    git commit -m "Your concise commit message"
  4. Push the Branch:

    git push origin feature/your-feature-name
  5. Submit a Pull Request on GitHub.


License

This project is licensed under the MIT License.


Additional Notes

For issues or feature requests, open a new GitHub Issue.

About

Sylvan is a scalable and secure Flask API template featuring modular Blueprints, SQLAlchemy ORM, encryption, and real-time chat. Optimized for performance.

License:MIT License


Languages

Language:HTML 76.8%Language:Python 22.6%Language:Dockerfile 0.6%