A modern, full-featured backend application built with AdonisJS, featuring authentication, file storage, and database management.
- Authentication System: Built-in user authentication and authorization
- File Storage: S3-compatible storage using MinIO
- Database: PostgreSQL database with Adminer UI for management
- API Documentation: Auto-generated Swagger documentation
- TypeScript Support: Full TypeScript implementation
- Docker Support: Containerized development environment
- Testing: Built-in testing framework with Japa
- Code Quality: ESLint and Prettier for code formatting and linting
- Real-time Communication: WebSocket support for online status and private messaging
- Node.js (Latest LTS version recommended)
- Docker and Docker Compose
- pnpm (Package manager)
- Clone the repository:
git clone <repository-url>
cd nova-core- Install dependencies:
pnpm install- Create a
.envfile in the root directory with the following variables:
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_DATABASE=your_db_name
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=password
S3_BUCKET=your-bucket-name- Start the development environment:
docker-compose up -d- Run database migrations:
node ace migration:run- (Optional) Seed the database with initial data:
node ace db:seedStart the development server:
pnpm devFor Hot Module Replacement (HMR):
pnpm dev:hmrpnpm start- Start the production serverpnpm build- Build the applicationpnpm dev- Start development serverpnpm dev:hmr- Start development server with HMRpnpm test- Run testspnpm lint- Run ESLintpnpm format- Format code with Prettierpnpm typecheck- Run TypeScript type checking
The application uses Docker Compose to manage the following services:
- PostgreSQL: Database server (port 5432)
- Adminer: Database management UI (port 8080)
- MinIO: S3-compatible object storage
- API endpoint: port 9000
- Console UI: port 9001
API documentation is automatically generated using Swagger. Access it at:
http://localhost:3333/docs
The application uses Socket.IO for real-time communication. Here are the available features:
// Connect to WebSocket server
const socket = io('http://localhost:3333', {
auth: { userId: currentUserId },
})
// Listen for user status changes
socket.on('user:status', ({ userId, isOnline }) => {
console.log(`User ${userId} is ${isOnline ? 'online' : 'offline'}`)
})The application supports real-time private messaging between users. Here are the available events:
// Send a private message
socket.emit('private:message', {
receiverId: otherUserId,
content: 'Hello!',
})
// Listen for sent confirmation
socket.on('private:message:sent', (message) => {
console.log('Message sent:', message)
})// Listen for incoming messages
socket.on('private:message', (message) => {
console.log('New message:', message)
})// Mark messages as read
socket.emit('private:message:read', {
senderId: otherUserId,
})
// Listen for read receipts
socket.on('private:message:read', ({ readerId }) => {
console.log('Messages read by:', readerId)
})// Send typing status
socket.emit('private:typing', {
receiverId: otherUserId,
})
// Listen for typing status
socket.on('private:typing', ({ userId }) => {
console.log('User typing:', userId)
})Private messaging also includes REST endpoints for managing messages:
-
GET /v1/messages/conversation?userId=:userId&otherUserId=:otherUserId- Get conversation history between two users
-
POST /v1/messages/mark-as-read- Mark messages as read
- Body:
{ userId: number, senderId: number }
-
GET /v1/messages/unread-count?userId=:userId- Get number of unread messages for a user
All endpoints require authentication using Bearer token. Full API documentation is available at /docs.
Run the test suite:
pnpm testnova-core/
βββ app/ # Application code
β βββ controllers/ # Route controllers
β βββ models/ # Database models
β βββ middleware/ # Custom middleware
β βββ services/ # Business logic
βββ config/ # Configuration files
βββ database/ # Database migrations and seeds
βββ start/ # Application startup files
βββ tests/ # Test files
- Environment variables are used for sensitive configuration
- Authentication is handled through @adonisjs/auth
- CORS is configured through @adonisjs/cors
- Input validation using VineJS
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and unlicensed.
- AdonisJS team for the amazing framework
- All contributors who have helped shape this project

