An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


dev stage logo

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

tech stack

---

## 🏗️ 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


dev stage landing page
dev stage invite page

### 📱 Mobile


dev stage landing page
dev stage invite page

---

## 📜 License

This project is licensed under the **BSD 3-Clause License**.

---

## 👤 Author

[**@th92rodr**](https://github.com/th92rodr)