A real-time chat application built with modern web technologies. Features 1-to-1 and group chats, file uploads, online status tracking, and an admin dashboard.
- Next.js 15 (App Router + Server Actions)
- TypeScript
- Tailwind CSS
- Zustand (state management)
- shadcn/ui (UI components)
- Socket.IO client (real-time messaging)
- Node.js + Express
- Socket.IO server (real-time)
- MongoDB (database)
- Redis (caching + presence tracking)
- Docker + Docker Compose
- Nginx (reverse proxy)
- pnpm (package manager)
- Turbo (monorepo build system)
- Real-time messaging (1-to-1 and group chats)
- Typing indicators and online/offline status
- File uploads (images, documents)
- Message seen/delivered status
- User authentication
- Admin dashboard for moderation
- Responsive design
- Web push notifications
- Node.js 18+
- pnpm
- MongoDB (local or Atlas)
- Redis (local or cloud)
- Docker & Docker Compose (for deployment)
- Clone the repository:
git clone https://github.com/NelakaWith/fine-wyne.git
cd fine-wyne- Install dependencies:
pnpm install- Set up environment variables:
Create
.env.localin the root directory with all configuration:
# Database
DATABASE_URL="mongodb://localhost:27017/fine-wyne"
# Redis
REDIS_URL="redis://localhost:6379"
# JWT
JWT_SECRET="your-super-secret-jwt-key-change-this-in-production"
# Ports
API_PORT="4000"
WEB_PORT="3000"
ADMIN_PORT="3001"
# URLs
NEXTAUTH_URL="http://localhost:3000"
FRONTEND_URL="http://localhost:3000"
ADMIN_URL="http://localhost:3001"
API_URL="http://localhost:4000"
# NextAuth
NEXTAUTH_SECRET="your-nextauth-secret-key-change-this-in-production"
# File Upload (DigitalOcean Spaces)
DO_SPACES_ACCESS_KEY=""
DO_SPACES_SECRET_KEY=""
DO_SPACES_BUCKET=""
DO_SPACES_REGION=""
DO_SPACES_ENDPOINT=""
# Email (for password reset, etc.)
EMAIL_SERVER_HOST=""
EMAIL_SERVER_PORT="587"
EMAIL_SERVER_USER=""
EMAIL_SERVER_PASSWORD=""
EMAIL_FROM=""
# Push Notifications
VAPID_PUBLIC_KEY=""
VAPID_PRIVATE_KEY=""
# Environment
NODE_ENV="development"Note: All apps read from the centralized config package (@fine-wyne/config), so the root .env.local provides variables for the entire monorepo.
- Set up the database:
pnpm --filter @fine-wyne/db db:pushRun all services:
pnpm devOr run individual services:
# Web app (port 3000)
pnpm --filter @fine-wyne/web dev
# API server (port 4000)
pnpm --filter @fine-wyne/api dev
# Admin dashboard (port 3001)
pnpm --filter @fine-wyne/admin devpnpm build
pnpm startfine-wyne/
├── apps/
│ ├── web/ # Main chat application (Next.js)
│ ├── api/ # API server (Express + Socket.IO)
│ └── admin/ # Admin dashboard (Next.js)
├── packages/
│ ├── db/ # Database models and Prisma client
│ ├── types/ # Shared TypeScript types
│ ├── utils/ # Utility functions
│ └── config/ # Configuration
├── infrastructure/ # Docker and deployment configs
├── package.json
├── pnpm-workspace.yaml
├── turbo.json
└── README.md
pnpm dev- Start all services in development modepnpm build- Build all services for productionpnpm lint- Run linting across all packagespnpm --filter @fine-wyne/db db:push- Push database schemapnpm --filter @fine-wyne/db db:generate- Generate Prisma client
The application is designed for self-hosting on DigitalOcean Droplets:
- Use Docker Compose for containerized deployment
- Nginx as reverse proxy
- Let's Encrypt for SSL certificates
- MongoDB and Redis in containers
See infrastructure/ directory for Docker configurations.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
ISC License - see LICENSE file for details.
For questions or issues, please open a GitHub issue or contact the maintainers.