Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Foresight

AI revenue intelligence platform for boutique hotels. Combines events, weather, flights, and competitor pricing to recommend optimal room rates.

Prerequisites

  • uv — Python package manager
  • Docker — for PostgreSQL (and optional containerized backend)
  • just — command runner

Quick Start

# Build the backend image
just build

# Start everything (db + backend with hot reload)
just dev

# Run migrations
just migrate

# View logs
just logs

# Stop everything
just destroy

The API will be available at http://localhost:8000
API docs at http://localhost:8000/docs

Re-run just build whenever you change backend dependencies or the Dockerfile — source code changes hot-reload automatically while just dev is running.

Database Migrations

# Create a new migration after changing models
just migrate-create "add_hotels_table"

# Run pending migrations
just migrate

# Rollback last migration
just migrate-down

Code Quality

# Lint
just lint

# Format
just format

# Fix lint issues + format
just fix

Pre-commit Hooks

# Install hooks (ruff formatting/linting + conventional commits)
just hooks

Commit messages must follow Conventional Commits:

  • feat: add pricing endpoint
  • fix: correct rate calculation
  • docs: update README

Project Structure

foresight/
├── backend/
│   ├── src/
│   │   ├── main.py              # FastAPI app entrypoint
│   │   ├── config.py            # Settings (pydantic-settings)
│   │   ├── routes/              # API route handlers
│   │   ├── database/            # SQLAlchemy + Alembic
│   │   │   ├── base.py          # Declarative base
│   │   │   ├── session.py       # Async session factory
│   │   │   ├── models/          # SQLAlchemy models
│   │   │   └── migrations/      # Alembic migrations
│   │   └── service/             # Business logic
│   ├── alembic.ini
│   ├── pyproject.toml
│   └── Dockerfile
├── frontend/                    # TBD
├── docker-compose.yml
├── justfile
├── .env.example
└── .pre-commit-config.yaml

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages