Skip to content

CodersLaunchpad/runailocal-frontend

Repository files navigation

Frontend Application

This is the frontend application built with Flask, designed to work with Python 3.11 and above.

Prerequisites

  • Python 3.11 or higher
  • pip (Python package installer)
  • Docker and Docker Compose (optional, for containerized deployment)

Installation

  1. Clone the repository:
git clone <repository-url>
cd frontend
  1. Create and activate a virtual environment:
# Windows
python -m venv venv
.\venv\Scripts\activate

# Linux/MacOS
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
    • Copy .env.example to .env:
    cp .env.example .env
    • Edit .env file and configure the following variables:
      • API_URL: Backend API URL
      • LOG_TOKEN: Logging token
      • FLASK_SECRET_KEY: Secret key for Flask
      • FLASK_DEBUG: Set to True for development, False for production

Running the Application

Development Mode

  1. Activate your virtual environment if not already activated
  2. Run the Flask development server:
python app.py

The application will be available at http://localhost:5000

Using Docker

  1. Build and run using Docker Compose:
docker-compose up --build

Project Structure

  • app.py: Main application entry point
  • routes/: Route handlers
  • templates/: HTML templates
  • static/: Static files (CSS, JS, images)
  • utils/: Utility functions
  • models/: Data models
  • settings/: Configuration settings

Environment Variables

  • API_URL: Backend API endpoint
  • LOG_TOKEN: Token for logging service
  • FLASK_SECRET_KEY: Secret key for Flask session
  • FLASK_DEBUG: Debug mode flag

Dependencies

Key dependencies include:

  • Flask 3.1.0
  • Flask-Session 0.8.0
  • PyJWT 2.10.1
  • python-dotenv 1.0.1
  • requests 2.32.3

For a complete list of dependencies, see requirements.txt

License

See the LICENSE file for details.

About

news feed (to be integrated into al maqar later

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •