Logo Lanfrica

data-aphid/47-map-gps

Domain:

geospatial

Record type:

software
Creator:
dat
Host:
Community based map for discovering adventure gems in Kenya. # 47-Map — Hidden Gems of Kenya A community-driven geographic directory of Kenya's hidden adventure spots, organized across all 47 counties. --- ## Architecture ``` 47map/ ├── backend/ │ ├── main.py # FastAPI routes (public + admin) │ ├── models.py # SQLAlchemy ORM models │ ├── schemas.py # Pydantic request/response schemas │ ├── database.py # DB engine & session factory │ ├── requirements.txt │ └── Dockerfile ├── frontend/ │ ├── index.html # Public explore page │ ├── submit.html # Community submission form │ └── admin.html # Admin moderation dashboard └── docker-compose.yml ``` --- ## Quick Start (Docker) ```bash # 1. Copy and configure environment cp backend/.env.example .env # Edit .env — set a strong ADMIN_SECRET # 2. Start everything docker-compose up -d # 3. Open the app open localhost # Public frontend open localhost # FastAPI interactive docs ``` --- ## Local Development (no Docker) ### Backend ```bash cd backend # Create and activate venv python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate # Install deps pip install -r requirements.txt # Set environment export DATABASE_URL="postgresql://postgres:password@localhost:5432/fortyseven_map" export ADMIN_SECRET="your-secret-key" # Run uvicorn main:app --reload --port 8000 ``` ### Frontend ```bash # Serve with any static server cd frontend python -m http.server 3000 # or: npx serve . ``` > The frontend expects the API at `localhost`. > Change the `API` constant at the top of each JS block to point elsewhere. --- ## API Reference ### Public | Method | Path | Description | |--------|------|-------------| | GET | `/` | Health check | | GET | `/meta` | Counties & categories list | | POST | `/gems` | Submit a new gem | | GET | `/gems` | List approved gems (filter by `?county=&category=`) | | GET | `/gems/{id}` | Get single approved gem | ### Admin (requi …