https://github.com/th92rodr/dev.stage
Event subscription and referral system - track invites, clicks, and leaderboards. Built with Fastify, PostgreSQL, Redis, and Next.js.
https://github.com/th92rodr/dev.stage
drizzle-orm event-management fastify nextjs postgresql redis referral-system tailwindcss
Last synced: 4 months ago
JSON representation
Event subscription and referral system - track invites, clicks, and leaderboards. Built with Fastify, PostgreSQL, Redis, and Next.js.
- Host: GitHub
- URL: https://github.com/th92rodr/dev.stage
- Owner: th92rodr
- License: bsd-3-clause
- Created: 2025-03-02T15:49:07.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-10-01T19:42:19.000Z (9 months ago)
- Last Synced: 2025-10-01T21:26:54.875Z (9 months ago)
- Topics: drizzle-orm, event-management, fastify, nextjs, postgresql, redis, referral-system, tailwindcss
- Language: TypeScript
- Homepage:
- Size: 434 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
DevStage — Event Referral System
DevStage is a full application that implements an **event subscription and referral system**.
It allows people to register for an event, share personal invite links, and compete on a leaderboard based on successful referrals.
This monorepo contains:
- **[`server/`](./server/README.md)** → Backend API built with **Node.js, Fastify, PostgreSQL, Redis, Drizzle ORM, TypeScript**
- **[`web/`](./web/README.md)** → Frontend app built with **Next.js, React.js, Tailwind CSS, TypeScript**
---
## 🎯 Features
### Backend
- Subscribe to an event with **duplicate email handling**
- Track **invite link clicks** (Redis)
- Track **successful referrals** (Redis sorted set)
- Show **leaderboard** with top referrers
- Swagger auto-docs at `/docs`
### Frontend
- Landing page with **event details** + **signup form**
- Referral page with:
- Personalized **invite link** (copy to clipboard)
- **Stats**: clicks, referrals, ranking position
- **Leaderboard** with medals for top 3
### Tech Stack
- **Backend**: Node, Fastify, TypeScript, Drizzle ORM, PostgreSQL, Redis, Swagger, Zod
- **Frontend**: Next.js (App Router), React, TypeScript, Tailwind CSS, React Hook Form, Zod, Orval
- **Infra**: Docker, PostgreSQL, Redis

---
## 🏗️ Project Structure
```
dev.stage/
├── server/ # Backend API
│ ├── src/
│ │ ├── database/ # Drizzle schema & migrations
│ │ ├── redis/ # Redis connection
│ │ ├── routes/ # Fastify routes (REST API)
│ │ ├── usecases/ # Business logic
│ │ ├── env.ts # Read environment variables
│ │ └── server.ts # Fastify server entry
│ └── tools/ # Docker Compose, API test file
│
├── web/ # Frontend App
│ ├── src/
│ │ ├── app/ # Next.js app router pages
│ │ ├── assets/ # Page logo and icons
│ │ ├── http/ # API client functions
│ │ └── components/ # Shared UI components
│ └── public/ # Static files
│
├── docs/ # Project layout images
└── README.md # Project documentation
```
---
## 🖌️ Layout
### 💻 Desktop
### 📱 Mobile
---
## 📜 License
This project is licensed under the **BSD 3-Clause License**.
---
## 👤 Author
[**@th92rodr**](https://github.com/th92rodr)