Skip to content

YektaRoustaei/RelayFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Project Image

RelayFlow

RelayFlow is a FastAPI-based backend for generating and visualizing routes that pass through T-junctions on a graph. It loads a graph, finds T-junctions, and provides endpoints to calculate and visualize routes that must pass through at least one T-junction.

Features

  • REST API for route calculation
  • Visualization of routes and T-junctions
  • Modular, clean project structure

Project Structure

RelayFlow/
  api/
    main.py           # FastAPI app instance, API entrypoint
    endpoints.py      # General endpoints (root, /map, etc.)
    models.py         # (optional) Pydantic schemas
    utils.py          # (optional) Helper functions
    services/         # (optional) Business logic
  app/
    routing.py        # Graph and T-junction logic
    t_junctions.py    # T-junction route logic
  static/
    route_map.html    # Generated map visualizations
  cache/
    *.json            # Cached data

Setup

  1. Clone the repository:
    git clone https://github.com/YektaRoustaei/RelayFlow.git
    cd RelayFlow
  2. Create and activate a virtual environment:
    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:
    pip install -r requirements.txt
  4. Run the API:
    uvicorn api.main:app --reload

Usage

  • POST to /route with origin and destination coordinates to get a route passing through a T-junction.
  • GET /map to view the generated route map.

License

MIT

About

RelayFlow app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published