Built sequentially as the repo-owner learn. Every feature maps to a concept. Every concept ships as a GitHub Issue.
DevLog is a real-time developer analytics platform where you connect your GitHub account and get a live dashboard of your coding activity β commit heatmaps, language breakdowns, repo star notifications, streaks, and a shareable public profile.
Learning objectives:
- REST and GraphQL APIs to coexist on the same server, powered by the same Mongoose models
- Real-time activity feed via GraphQL Subscriptions (the same tech GitHub and Shopify use in production)
- Full auth system with JWT, cookies, and role-based authorization
- Production-ready patterns β MVC architecture, cluster module, streaming CSV exports
Link to be added after deployment
| Layer | Technology |
|---|---|
| Runtime | Node.js |
| Framework | Express.js |
| Database | MongoDB + Mongoose |
| APIs | GitHub REST API, GraphQL |
| GraphQL Server | Apollo Server |
| Real-time | WebSockets β GraphQL Subscriptions |
| Auth | JWT + Cookies |
| File Uploads | Multer |
| Streams | Node.js Transform Streams |
| Scaling | Node.js Cluster Module |
The build is divided into 13 sequential GitHub Issues, each targeting a specific concept. They are designed to be tackled one at a time β each issue builds directly on the last.
Concepts: Node.js basics, built-in modules, File System
Fetch your GitHub public events using the GitHub REST API from the command line. Save the raw response to a local activity.json file. No frameworks, no HTTP server β just Node and fs.
Deliverable: cli/fetch-activity.js β runnable with node cli/fetch-activity.js <username>
Concepts: Node http module, URL parsing, HTTP methods
Replace the CLI script with a raw Node HTTP server (no Express). Manually parse the URL and method to route requests to /activity and /stats. This forces you to see exactly what Express abstracts away.
Deliverable: server-raw.js β runs without any npm packages
Concepts: Express, REST APIs, Middleware, Postman
Refactor the raw server into an Express app. Add custom middleware that logs every request β method, URL, and timestamp β to a file using fs. Test all routes in Postman and include screenshots in the PR.
Deliverable: src/app.js, src/middleware/logger.js
Concepts: MongoDB, Mongoose, MVC architecture
Persist GitHub activity data to MongoDB. Create Mongoose models for User and CommitEvent. Refactor the entire codebase into proper MVC β routes/, controllers/, and models/ in separate folders.
Deliverable: Full MVC directory structure, two Mongoose schemas
Concepts: Authentication, JWT, Cookies
Add a login and signup system. Users connect their GitHub username on signup. JWT tokens are issued on login and stored in HTTP-only cookies. All dashboard routes are protected behind an authenticate middleware.
Deliverable: POST /auth/signup, POST /auth/login, GET /dashboard (protected)
Concepts: Multer, multipart form data
Let users upload a profile picture stored to disk via POST /profile/avatar. Validate file type (images only) and size. (Bonus: swap local disk storage for Cloudinary β worth adding to your resume.)
Deliverable: src/middleware/upload.js, avatar stored in uploads/
Concepts: WebSockets, ws library
Add a live activity feed panel to the dashboard. Poll the GitHub API every 30 seconds for new star events. When a new star is detected, push a real-time notification to all connected clients over WebSockets.
Deliverable: src/ws/activityFeed.js, client-side event listener in public/
Concepts: Node.js Streams, Transform streams
Add a GET /export/commits endpoint that streams the user's full commit history as a downloadable CSV. Use a Transform stream to convert raw data to CSV format β no loading everything into memory at once.
Deliverable: src/streams/csvExport.js
Concepts: Node.js Cluster module, CPU cores
Add a cluster.js entry point that spawns one worker per CPU core using the cluster module. Workers share the same port. Document in the README why this matters for production Node.js applications.
Deliverable: cluster.js, updated README section on clustering
Concepts: GraphQL schema definition, queries, resolvers
Add a /graphql endpoint alongside your existing REST routes. Define a Query { user(username: String!): User } type. Wire resolvers to the same Mongoose models that power your REST API. Both APIs now coexist on the same server.
Deliverable: src/graphql/schema.js, src/graphql/resolvers.js
Concepts: GraphQL mutations, MongoDB writes
Replace the REST POST /profile and PUT /profile/github routes with GraphQL mutations β updateProfile and linkGitHub. Demonstrate in the README that the same Mongoose models back both REST and GraphQL.
Deliverable: mutation { updateProfile(...): User }, mutation { linkGitHub(...): User }
Concepts: Apollo Server, Express integration
Swap the basic express-graphql setup for Apollo Server integrated with Express. This gives you the Apollo Sandbox explorer at /graphql (like Postman for GraphQL). Include a screenshot of the Sandbox in your README β it's a great visual for your portfolio.
Deliverable: src/graphql/apollo.js, Apollo Sandbox screenshot in /docs
Concepts: GraphQL Subscriptions, PubSub, WebSocket transport
Replace the WebSocket-based activity feed (Issue #8) with a proper GraphQL Subscription β subscription { newStarEvent }. The real-time feature is now expressed cleanly in GraphQL using the same transport layer. This is exactly what production systems like GitHub's own API use.
Deliverable: subscription { newStarEvent: StarEvent }, src/graphql/pubsub.js
MIT