|
| 1 | +# Getting Started |
| 2 | + |
| 3 | +Welcome! This guide will help you get set up quickly. |
| 4 | + |
| 5 | +## Quick Setup |
| 6 | + |
| 7 | +### 1. Start the API Server |
| 8 | + |
| 9 | +```bash |
| 10 | +cd server |
| 11 | +npm install |
| 12 | +npm start |
| 13 | +``` |
| 14 | + |
| 15 | +You should see: |
| 16 | +``` |
| 17 | +Generating mock data... |
| 18 | +Generated 5000 organizations |
| 19 | +Generated 90 days of DAU data |
| 20 | +API server running on http://localhost:3001 |
| 21 | +``` |
| 22 | + |
| 23 | +### 2. Test the APIs |
| 24 | + |
| 25 | +```bash |
| 26 | +# In a new terminal |
| 27 | +curl http://localhost:3001/api/metrics/dau |
| 28 | +curl http://localhost:3001/api/metrics/top-orgs |
| 29 | +``` |
| 30 | + |
| 31 | +### 3. Build Your Frontend |
| 32 | + |
| 33 | +```bash |
| 34 | +# Create your frontend directory |
| 35 | +mkdir frontend |
| 36 | +cd frontend |
| 37 | + |
| 38 | +# Use your preferred setup |
| 39 | +# Examples: |
| 40 | +npm create vite@latest . # Vite (React, Vue, Svelte, etc.) |
| 41 | +npx create-next-app@latest . # Next.js |
| 42 | +npx create-react-app . # Create React App |
| 43 | +# ... or any other framework |
| 44 | +``` |
| 45 | + |
| 46 | +## What You're Building |
| 47 | + |
| 48 | +A single-page "Usage Analytics" dashboard that helps answer: |
| 49 | +- **"How is our DAU trending over time?"** |
| 50 | +- **"Which organizations are most active?"** |
| 51 | + |
| 52 | +You'll need to decide: |
| 53 | +- How to visualize DAU trends |
| 54 | +- How to present organization data effectively |
| 55 | +- What interactions users need |
| 56 | +- How to handle edge cases and errors |
| 57 | + |
| 58 | +## Available APIs |
| 59 | + |
| 60 | +**GET /api/metrics/dau** |
| 61 | +- Returns daily active user data |
| 62 | +- Call it to see the response format |
| 63 | + |
| 64 | +**GET /api/metrics/top-orgs** |
| 65 | +- Returns organizations ranked by activity |
| 66 | +- Call it to see the response format |
| 67 | + |
| 68 | +Explore these endpoints to understand what data is available. |
| 69 | + |
| 70 | +## What to Submit |
| 71 | + |
| 72 | +1. **Working application** - We should be able to run it |
| 73 | +2. **Tests** - At least 2 meaningful test cases |
| 74 | +3. **AI_NOTES.md** - Document how you used AI (see AI_NOTES_EXAMPLE.md for format) |
| 75 | +4. **README.md** - Update with your decisions, trade-offs, and what you'd do with more time |
| 76 | + |
| 77 | +## Tips |
| 78 | + |
| 79 | +- **Time:** Aim for 2-3 hours. Don't spend more than this. |
| 80 | +- **Framework:** Use whatever you're most comfortable with. |
| 81 | +- **AI:** Feel free to use AI! Just document it in AI_NOTES.md. |
| 82 | +- **Backend:** The server code is available if you want to explore or modify it. |
| 83 | +- **Questions:** If anything is unclear, please ask! |
| 84 | + |
| 85 | +## Submission |
| 86 | + |
| 87 | +When you're done: |
| 88 | +1. Create a PR with your changes |
| 89 | +2. Fill out the PR template |
| 90 | +3. We'll review and schedule a follow-up discussion |
| 91 | + |
| 92 | +## Need Help? |
| 93 | + |
| 94 | +- Check `AI_NOTES_EXAMPLE.md` for documentation format |
| 95 | +- Look at `server/routes/metrics.js` to understand the API |
| 96 | +- The server code is clean and modifiable - feel free to explore |
| 97 | + |
| 98 | +Good luck! 🚀 |
| 99 | + |
0 commit comments