A modern SaaS application built with AdonisJS (API) and React (Frontend).
ScholasticCloud/
├── api/ # AdonisJS API server
├── app/ # React frontend application
├── shared/ # Shared types and utilities
├── docs/ # Documentation
├── scripts/ # Build and deployment scripts
├── docker-compose.yml # Docker Compose for PostgreSQL
└── README.md # This file
- Framework: AdonisJS 6.x
- Database: PostgreSQL
- Language: TypeScript
- ORM: Lucid ORM
- Framework: React 18.x
- Build Tool: Vite
- Language: TypeScript
- State Management: TanStack Query
- HTTP Client: Axios
- Styling: TailwindCSS
- Forms: Formik
- Types: Shared TypeScript interfaces and types
- PostgreSQL: 15.x with Docker
- pgAdmin: Web-based database management
- Node.js 18+
- Docker Desktop
- npm or yarn
First, start the PostgreSQL database using Docker:
# Unix/Linux/macOS
chmod +x scripts/docker-db.sh
./scripts/docker-db.sh start
# Windows PowerShell
.\scripts\docker-db.ps1 startOr start both PostgreSQL and pgAdmin:
# Unix/Linux/macOS
./scripts/docker-db.sh start-all
# Windows PowerShell
.\scripts\docker-db.ps1 start-allDatabase Access:
- PostgreSQL:
localhost:5432 - Username:
scholasticcloud - Password:
scholasticcloud123 - Database:
scholasticcloud - pgAdmin:
http://localhost:5050([email protected] / admin123)
Run the setup script to install dependencies:
# Unix/Linux/macOS
chmod +x scripts/setup.sh
./scripts/setup.sh
# Windows PowerShell
.\scripts\setup.ps1Copy the environment file and update it with your settings:
# Copy the environment file
cp api/env api/.env
# Edit the file with your preferred editor
# The default settings should work with the Docker database# Terminal 1 - Start API server
cd api
npm run dev
# Terminal 2 - Start frontend server
cd app
npm run dev- API: http://localhost:3333
- APP: http://localhost:5173
- Database: localhost:5432
- pgAdmin: http://localhost:5050
# Start database only
./scripts/docker-db.sh start
# Start database and pgAdmin
./scripts/docker-db.sh start-all
# Stop all services
./scripts/docker-db.sh stop
# Restart database
./scripts/docker-db.sh restart
# View logs
./scripts/docker-db.sh logs
# Reset database (delete all data)
./scripts/docker-db.sh reset
# Check status
./scripts/docker-db.sh status# Start all services
docker-compose up -d
# Start only PostgreSQL
docker-compose up -d postgres
# Stop all services
docker-compose down
# View logs
docker-compose logs -f
# Reset database
docker-compose down -v
docker-compose up -d postgres# Database Configuration
DB_CONNECTION=pg
PG_HOST=localhost
PG_PORT=5432
PG_USER=scholasticcloud
PG_PASSWORD=scholasticcloud123
PG_DB_NAME=scholasticcloud
# App Configuration
NODE_ENV=development
PORT=3333
APP_KEY=your-app-key-here
APP_URL=http://localhost:3333
# Authentication
JWT_SECRET=your-jwt-secret-here
JWT_EXPIRES_IN=24hVITE_API_BASE_URL=http://localhost:3333
VITE_APP_NAME=ScholasticCloudThe docker-compose.yml file includes:
- PostgreSQL 15: Main database
- pgAdmin 4: Database management interface
| Service | Port | Description |
|---|---|---|
| postgres | 5432 | PostgreSQL database |
| pgadmin | 5050 | Web-based database admin |
-
Check if Docker is running:
docker --version docker-compose --version
-
Check database status:
./scripts/docker-db.sh status
-
View database logs:
./scripts/docker-db.sh logs
-
Reset database if needed:
./scripts/docker-db.sh reset
If ports 5432 or 5050 are already in use:
-
Stop existing services:
# Stop PostgreSQL service (if running locally) sudo systemctl stop postgresql # Or find and kill processes using the ports lsof -ti:5432 | xargs kill -9 lsof -ti:5050 | xargs kill -9
-
Or modify docker-compose.yml to use different ports
Please read the contributing guidelines before submitting pull requests.
This project is licensed under the MIT License.