This guide walks you through cloning the WayFy repository, configuring environment variables, running database migrations, and starting both the Flask backend and the Vite frontend on your local machine. The entire setup takes under ten minutes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jhonyes04/new-wayfy/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Ensure the following are installed before you begin:| Tool | Version | Notes |
|---|---|---|
| Node.js | >= 20 | Required for the Vite frontend |
| Python | 3.13 | Required for the Flask backend |
| pipenv | latest | Manages Python virtualenv and dependencies |
| PostgreSQL | 14+ | SQLite works for quick local testing; PostgreSQL is required for production parity |
| Git | any | To clone the repository |
WayFy is fully compatible with GitHub Codespaces. Open the repository in a Codespace and all prerequisites are pre-installed in the default environment. You can skip to Backend Setup immediately.
Backend Setup
Install Python dependencies
Pipfile.lock.Configure environment variables
Copy the example file and fill in your values:Open
.env and set the following variables:| Variable | Description | Example |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | postgresql://user:pass@localhost:5432/wayfy |
FLASK_APP | Entry point for Flask CLI | src/app.py |
FLASK_APP_KEY | Flask secret key for sessions | any long random string |
FLASK_DEBUG | Enable Flask debug mode (1 = on) | 1 |
JWT_SECRET_KEY | Signs and verifies JWT tokens — required | any long random string |
JWT_ACCESS_TOKEN_EXPIRES_HOURS | Token lifetime in hours | 1 |
CORS_ALLOWED_ORIGINS | Comma-separated allowed origins | http://localhost:3000 |
GROQ_API_KEY | API key from console.groq.com | gsk_... |
CONTACT_EMAIL | Address used in outbound emails | hello@wayfy.app |
CLOUDINARY_CLOUD_NAME | Your Cloudinary cloud name — required for image uploads | my-cloud |
CLOUDINARY_API_KEY | Cloudinary API key — required for image uploads | 123456789012345 |
CLOUDINARY_API_SECRET | Cloudinary API secret — required for image uploads | abc123... |
JWT_SECRET_KEY is mandatory. The application raises a RuntimeError at startup if this variable is missing or empty.Apply database migrations
flask db upgrade and applies all Alembic migrations to the database defined in DATABASE_URL, creating all tables.Seed test data (optional)
To populate the database with sample places, users, trips, and reviews for local development:To create a specific number of test users:
Start the Flask development server
Frontend Setup
Configure environment variables
.env:| Variable | Description | Value |
|---|---|---|
VITE_BACKEND_URL | URL of the running Flask backend | http://localhost:3001 |
VITE_MAPBOX_TOKEN | Public token from account.mapbox.com | pk.eyJ1... |
VITE_BASENAME | Base path for the React Router | / |
VITE_GEOAPIFY_KEY | Geoapify API key for address autocomplete (optional — geocoding features are disabled without it) | your_key_here |
VITE_GEOAPIFY_KEY is not included in .env.example but is a real variable consumed by the GeoapifyAutocomplete component. Obtain a free key at geoapify.com. Address autocomplete silently degrades if the key is absent.Start the Vite development server
Verify the Installation
Open your browser and confirm each of the following routes loads correctly:| URL | Expected result |
|---|---|
http://localhost:3000/ | WayFy landing page |
http://localhost:3000/map | Interactive Mapbox accessibility map |
http://localhost:3000/login | Login form |
http://localhost:3000/register | Registration form |
http://localhost:3001/ | Flask backend root (JSON or 404 — confirms API is alive) |
Available Commands
Backend (pipenv scripts)
| Command | Underlying command | Description |
|---|---|---|
pipenv run start | flask run -p 3001 -h 0.0.0.0 | Start Flask development server |
pipenv run migrate | flask db migrate | Generate a new Alembic migration from model changes |
pipenv run upgrade | flask db upgrade | Apply pending migrations to the database |
pipenv run downgrade | flask db downgrade | Revert the most recent migration |
pipenv run insert-test-data | flask insert-test-data | Seed the database with sample data |
flask insert-test-users 5 | (CLI command) | Create 5 test user accounts |
Frontend (npm / pnpm scripts)
| Command | Description |
|---|---|
npm run dev / npm run start | Start the Vite dev server on port 3000 with HMR |
npm run build | Compile a production build into frontend/dist/ |
npm run preview | Serve the production build locally for testing |
npm run lint | Run ESLint across the frontend source |