Pingoo is a modern, full-stack hybrid messaging application built with Next.js (frontend) and NestJS (backend). This project is designed to be scalable, maintainable, and follows best practices for modern web development.
- Next.js 16 with TypeScript and Turbopack
- Tailwind CSS for styling
- shadcn/ui for UI components
- Redux Toolkit for state management
- Motion for animations
- Axios for HTTP requests
- NestJS with TypeScript
- PostgreSQL with MikroORM
- JWT Authentication with refresh tokens
- Swagger for API documentation
- Class-validator for validation
- Cloudinary for media storage
- Prettier for code formatting
- ESLint for linting
- Concurrently for running multiple services
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL (or use Neon cloud database)
- Git
git clone https://github.com/Rahi-007/Pingoo.git
cd PingooRun the following command to install all dependencies (root, frontend, and backend):
npm run install:allAlternatively, you can install them separately:
# Install root dependencies
npm install
# Install frontend dependencies
npm install --prefix apps/frontend
# Install backend dependencies
npm install --prefix apps/backendCopy the .env.example file to .env:
cp .env.example .envEdit the .env file with your configuration:
# Frontend Environment Variables
NODE_ENV=development
NEXT_PUBLIC_BACKEND_API_URL=http://localhost:8080
# Server (Backend)
PORT=8080
CORS_ORIGIN=http://localhost:3000
# Database Configuration (choose one option)
# Option 1: Neon PostgreSQL (cloud)
DATABASE_URL=postgresql://username:password@host/database?sslmode=require
# Option 2: Local PostgreSQL
DB_NAME=pingoo
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
# JWT Configuration
JWT_SECRET=your_jwt_secret_key_here
JWT_EXPIRES_IN=1d
JWT_REFRESH_SECRET=your_refresh_secret_key_here
JWT_REFRESH_EXPIRES_IN=7d- Install PostgreSQL on your machine
- Create a database named
pingoo(or whatever you configured in.env) - Run database migrations and seed data:
npm run sync:db- Create a free account at Neon.tech
- Create a new project and get your connection string
- Update the
DATABASE_URLin your.envfile - Run the seed command:
npm run sync:dbRun both frontend and backend simultaneously:
npm run devThis will start:
- Frontend at
http://localhost:3000 - Backend at
http://localhost:8080
You can also run them separately:
# Frontend only
npm run dev --prefix apps/frontend
# Backend only
npm run start:dev --prefix apps/backendpingoo/
βββ apps/
β βββ frontend/ # Next.js frontend application
β β βββ src/
β β β βββ app/ # Next.js app router pages
β β β βββ components/# React components
β β β βββ context/ # Redux store and slices
β β β βββ hooks/ # Custom React hooks
β β β βββ interface/ # TypeScript interfaces
β β β βββ lib/ # Utility functions
β β β βββ provider/ # Context providers
β β β βββ service/ # API service functions
β β β βββ style/ # Global CSS styles
β β βββ public/ # Static assets
β βββ backend/ # NestJS backend application
β βββ src/
β β βββ auth/ # Authentication module
β β βββ user/ # User management
β β βββ config/ # Configuration files
β β βββ common/ # Shared utilities
β β βββ health/ # Health checks
β βββ test/ # Test files
βββ database/ # Database schemas and migrations
βββ docs/ # Documentation
βββ .env.example # Environment variables template
| Command | Description |
|---|---|
npm run install:all |
Install all dependencies (root, frontend, backend) |
npm run dev |
Start both frontend and backend in development mode |
npm run build |
Build both frontend and backend for production |
npm run format |
Format code in both frontend and backend |
npm run clean |
Remove all node_modules directories |
npm run sync:db |
Sync database schema and seed data |
npm run refresh:db |
Refresh database with fresh seed data |
| Command | Description |
|---|---|
npm run dev |
Start Next.js development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run format |
Format code with Prettier |
| Command | Description |
|---|---|
npm run start:dev |
Start NestJS in development mode with watch |
npm run build |
Build TypeScript files |
npm run start |
Start production server |
npm run format |
Format code with Prettier |
npm run seed |
Refresh and seed database |
npm run seed:sync |
Sync database schema and seed |
Once the backend is running, you can access the Swagger API documentation at:
http://localhost:8080/api
The API endpoints include:
- Authentication: Login, register, refresh tokens
- Users: Get user profile, update user information
- Health: System health checks
We welcome contributions! Please follow these steps to contribute:
Click the "Fork" button at the top right of the repository page.
git clone https://github.com/YOUR_USERNAME/Pingoo.git
cd Pingoogit checkout -b feature/your-feature-name- Write clean, well-documented code
- Follow the existing code style
- Add tests if applicable
- Update documentation as needed
git add .
git commit -m "Add: your feature description"git push origin feature/your-feature-name- Go to the original repository
- Click "New Pull Request"
- Select your fork and feature branch
- Add a clear description of your changes
- Submit the pull request
When creating a pull request, please ensure:
- Descriptive Title: Clearly describe what the PR does
- Detailed Description: Explain the changes and why they're needed
- Related Issues: Reference any related issues (e.g., "Fixes #123")
- Screenshots: Include screenshots for UI changes
- Testing: Confirm that your changes don't break existing functionality
## Description
[Describe what this PR does]
## Changes Made
- [ ] Change 1
- [ ] Change 2
- [ ] Change 3
## Testing
- [ ] Tested locally
- [ ] All tests pass
- [ ] No breaking changes
## Screenshots (if applicable)
[Add screenshots here]
## Related Issues
Fixes #issue_number
If you find a bug or have a feature request, please create an issue on GitHub:
- Go to the Issues page
- Click "New Issue"
- Choose the appropriate template
- Provide as much detail as possible:
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Environment details (OS, browser, Node version)
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework
- NestJS - A progressive Node.js framework
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Re-usable components
- MikroORM - TypeScript ORM
- Author: Bisakto-Rahi
- GitHub: @Rahi-007
- Repository: https://github.com/Rahi-007/Pingoo
Thank you! π