A modern web application for sending and receiving Kudos, built with Next.js and deployed on Cloudflare Workers.
- Next.js 15 - React framework with App Router
- React 18 - UI library
- TypeScript 5 - Type-safe JavaScript
- Tailwind CSS 4 - Utility-first CSS framework
- Tiptap - Rich text editor
- Supabase - Backend as a Service (PostgreSQL, Auth, Storage)
- Cloudflare Workers - Edge runtime deployment
- OpenNext - Next.js adapter for Cloudflare
- Wrangler - Cloudflare CLI tool
- Vitest - Unit testing framework
- Testing Library - React testing utilities
- ESLint - Code linting
- Node.js 20+
- Yarn 1.x
# Install dependencies
yarn install
# Copy environment variables
cp .env.local.example .env.local
# Then edit .env.local with your Supabase credentials# Start development server
yarn devOpen http://localhost:3000 in your browser.
# Run tests in watch mode
yarn test
# Run tests once
yarn test:runyarn lintThis project is deployed on Cloudflare Workers using OpenNext adapter.
| Command | Description |
|---|---|
yarn build:cloudflare |
Build for Cloudflare Workers |
yarn preview:cloudflare |
Local preview before deployment |
yarn deploy:cloudflare |
Deploy to Cloudflare Workers |
# Build and deploy in one step
yarn build:cloudflare && yarn deploy:cloudflareConfigure environment variables in Cloudflare Dashboard:
- Go to Cloudflare Dashboard
- Navigate to: Workers & Pages →
ssa-2025-ex→ Settings → Variables - Add the following variables:
| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anonymous key |
For local development, use .dev.vars file.
https://ssa-2025-ex.nguyen-ngoc-hung-b.workers.dev
├── app/ # Next.js App Router
│ ├── (auth)/ # Auth routes (login)
│ ├── (main)/ # Main app routes
│ ├── api/ # API routes
│ └── auth/ # Auth callback
├── components/ # React components
├── hooks/ # Custom React hooks
├── lib/ # Utilities and services
│ ├── i18n/ # Internationalization
│ ├── services/ # Business logic
│ ├── supabase/ # Supabase clients
│ └── utils/ # Helper functions
├── types/ # TypeScript types
└── public/ # Static assets
| Script | Description |
|---|---|
yarn dev |
Start development server |
yarn build |
Build for production (Node.js) |
yarn start |
Start production server (Node.js) |
yarn lint |
Run ESLint |
yarn test |
Run tests in watch mode |
yarn test:run |
Run tests once |
yarn build:cloudflare |
Build for Cloudflare Workers |
yarn preview:cloudflare |
Preview Cloudflare build locally |
yarn deploy:cloudflare |
Deploy to Cloudflare Workers |