Skip to content

Commit fe4d46c

Browse files
authored
Merge pull request #77 from sousa-dev/cursor/add-agents-md-bc1e
Add AGENTS.md with Cursor Cloud development instructions
2 parents 90906a5 + f94c3e2 commit fe4d46c

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AGENTS.md
2+
3+
## Cursor Cloud specific instructions
4+
5+
### Overview
6+
7+
São Miguel Bus API — Django 3.0 REST backend serving bus schedule data for São Miguel Island (Azores). Uses SQLite in dev, PostgreSQL in production (controlled by `ENVIRONMENT` env var).
8+
9+
### Running the API
10+
11+
```bash
12+
cd /agent/repos/SaoMiguelBus-api/src
13+
python3 manage.py runserver 0.0.0.0:8000
14+
```
15+
16+
Dev mode uses SQLite (no external DB needed). The database file at `src/db.sqlite3` contains pre-seeded route/stop data.
17+
18+
### Running tests
19+
20+
```bash
21+
cd /agent/repos/SaoMiguelBus-api/src
22+
python3 manage.py test
23+
```
24+
25+
### Non-obvious caveats
26+
27+
- `psycopg2-binary==2.8.6` in `requirements.txt` is incompatible with Python 3.12+. Install `psycopg2-binary>=2.9` after running `pip install -r requirements.txt` to fix the import error. This only affects the build from source; the newer binary wheel works fine.
28+
- The settings file imports `dj_database_url` and calls `.config()` which reads `DATABASE_URL` env var. In dev (no `DATABASE_URL` set), this is a no-op and SQLite is used.
29+
- `GOOGLE_MAPS_API_KEY` and `AUTH_KEY` default to dummy values in dev — the step-by-step directions feature won't work without a real key, but all other endpoints function normally.
30+
- `ALLOWED_HOSTS` includes `127.0.0.1` so local dev server works out of the box.

0 commit comments

Comments
 (0)