A hosted multi-user Mission Control API themed around NASA's Artemis II lunar mission. Participants register as Flight Directors, receive a unique callsign and procedural SVG sigil, and complete a 5-step lunar mission by sending API requests. Each step corresponds to a phase of the Artemis II trajectory -- from launch through splashdown.
git clone <repo-url> artemis-api
cd artemis-api
npm install
cp .env.example .env # then edit .env with your values
npm startServer Base URL: https://artemis.up.railway.app
(The server starts locally on http://localhost:3000 by default.)
To help you run and participate in the workshop, we provide the following guides:
- Participant Guide (ARTEMIS_PARTICIPANT_GUIDE_v2.md): The primary entry point for attendees. Includes instructions for getting started, making requests, and progressing through the 5-step mission.
- API Reference (API_REFERENCE.md): A detailed, comprehensive breakdown of every endpoint, request/response schema, and authentication requirements.
- Story & Examples (STORY_EXAMPLES.md): Context and lore for the workshop, featuring example request payloads and the reasoning behind each mission phase.
- Install PostgreSQL if you haven't already.
- Create the database:
CREATE DATABASE artemis_workshop;- Set the
DATABASE_URLenvironment variable in your.envfile:
DATABASE_URL=postgresql://user:password@localhost:5432/artemis_workshop
The database schema is created automatically on startup -- no manual migration step is needed.
| Step | Phase | Action |
|---|---|---|
| 1 | Launch | Register (POST /register) |
| 2 | Earth Orbit | Create your first log (POST /logs) |
| 3 | Transit | Update a log (PATCH /logs/:id) |
| 4 | Lunar Flyby | Get a mission briefing (POST /mission/brief) |
| 5 | Splashdown | Have 5+ total logs |
| Method | Path | Description | Auth Required |
|---|---|---|---|
| GET | /health | Health check and API status | No |
| POST | /register | Register as a Flight Director | No |
| GET | /mission | View your mission progress and stats | Yes |
| POST | /mission/brief | Generate a mission briefing with recommendations | Yes |
| GET | /mission/debrief | HTML debrief page (pass api_key as query param) |
No (query key) |
| POST | /logs | Create a new mission log entry | Yes |
| GET | /logs | List your log entries (supports filters) | Yes |
| GET | /logs/:id | Get a single log entry by ID | Yes |
| PATCH | /logs/:id | Update a log entry | Yes |
| DELETE | /logs/:id | Delete a log entry | Yes |
| GET | /leaderboard | View the mission leaderboard | No |
| POST | /admin/reset | Reset the entire database (requires admin key) | Admin |
Authentication: Include your API key in the x-api-key header:
x-api-key: <your_api_key>
Log fields:
title(required): Log title, max 200 charactersdescription(optional): Additional detailsphase(required): pre-launch, launch, orbit, transit, lunar-approach, flyby, return, reentrycategory(required): navigation, life-support, communication, science, crew-status, anomalycrew_member(required): wiseman, glover, koch, hansen
Note: Logs with category
anomalycannot be deleted. Update them instead.
curl -X POST https://artemis.up.railway.app/register \
-H "Content-Type: application/json" \
-d '{"name": "Ada Lovelace", "email": "[email protected]"}'curl -X POST https://artemis.up.railway.app/logs \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"title": "Navigation system calibrated",
"phase": "orbit",
"category": "navigation",
"crew_member": "wiseman"
}'curl https://artemis.up.railway.app/mission \
-H "x-api-key: YOUR_API_KEY"curl -X POST https://artemis.up.railway.app/mission/brief \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{}'curl https://artemis.up.railway.app/leaderboard| Variable | Description | Default |
|---|---|---|
PORT |
Port the server listens on | 3000 |
ADMIN_KEY |
Secret key for admin endpoints | (required for /admin/reset) |
DATABASE_URL |
Full PostgreSQL connection string | postgresql://user:password@localhost:5432/artemis_workshop |
PGHOST |
PostgreSQL host (if DATABASE_URL is not set) | localhost |
PGPORT |
PostgreSQL port (if DATABASE_URL is not set) | 5432 |
PGDATABASE |
PostgreSQL database name | artemis_workshop |
PGUSER |
PostgreSQL user | artemis |
PGPASSWORD |
PostgreSQL password | (none) |
DATABASE_URL takes precedence over the individual PG* variables when both are set.
MIT