# Claudio Olmedo Shop - One Dollar Computer Project Storefront and administrative portal for the One Dollar Computer project: "A one dollar computer every student can take home." Allows contributing to specific project milestones and allocations. ## Core Documentation - [README.md](file:///Users/claudio/github/shop/README.md) - Project configuration, installation, commands, and deployment guide. - [AGENTS.md](file:///Users/claudio/github/shop/AGENTS.md) - Essential interaction rules and legal/financial safety constraints for AI agents. - [docs/ANTIGRAVITY_HANDOFF.md](file:///Users/claudio/github/shop/docs/ANTIGRAVITY_HANDOFF.md) - History, design constraints, and technical notes. - [openapi.json](file:///Users/claudio/github/shop/openapi.json) - OpenAPI 3.0 API specifications. - [.well-known/mcp-server-card](file:///Users/claudio/github/shop/.well-known/mcp-server-card) - MCP server definition. ## Product Catalog & Milestones The following contribution tiers are available. Each tier corresponds to a specific project milestone with buying/quantity limits and rewards: | ID | Name | Unit Amount | Max Qty | Reward / Purpose | | :--- | :--- | :---: | :---: | :--- | | `support_one_computer` | Fund one computer allocation | $1.00 | 10000 | Supporter recognition | | `prototype_10_pack` | Fund 10 prototype boards | $100.00 | 100 | Prototype board allocation | | `testing_fixture` | Support test fixtures & validation | $500.00 | 20 | Engineering test fixture validation | | `manufacture_3000_pack` | Fund a 3,000-board run | $3,000.00 | 5 | 3,000-board manufacturing run support | | `custom_contribution` | One-Time Project Contribution | Custom ($1 - $10k) | 1 | Direct financial support | *Note: Product quantities must be positive integers within their respective Max Qty limits.* ## Tech Stack - Native Node.js HTTP Server (`server.js`) without Express framework. - PostgreSQL database storage (with dynamic seed falling back to local `campaigns.json` and `contributions.json` files). - Static frontend (`index.html`, `js/shop.js`, `style.css`). - Stripe Checkout integration for payment processing. ## Agent API & Route Map - **GET `/api/campaigns`**: Retrieve list of active milestones (public). - **GET `/api/milestones`**: Alias of campaigns endpoint (public). - **GET `/api/contributions`**: Retrieve public contributors wall (public). - **POST `/api/create-checkout-session`**: Create Stripe Checkout session for custom contributions/milestones (public). - **POST `/api/admin/login`**: Authenticate using 6-digit TOTP Google Authenticator code (public). Returns a session token. - **GET `/api/admin/emails`**: Retrieve contributor email directory (admin, requires Bearer token). - **POST `/api/campaigns`**: Create or update a milestone campaign (admin, requires Bearer token). - **POST `/api/campaigns/delete`**: Delete a milestone by ID (admin, requires Bearer token). ## Agent Authentication Flow 1. Ask the user for the current 6-digit TOTP code from their Google Authenticator app. 2. Send a `POST` request to `/api/admin/login` with payload `{"password": "<6-digit-code>"}`. 3. Save the returned `token` and add it to all subsequent administrative request headers as: `Authorization: Bearer `