This repository contains the Next.js web application for the Center for Admission and Travels. It features a public-facing travel agency website alongside a comprehensive, fully-integrated professional Admin System.
The core feature of this application is its custom Admin System, which is built to be an exact replica of the public-facing pages. This architecture enables administrators to perform intuitive, inline, WYSIWYG editing of website content (such as Hero sections, Packages, Travel Tours, and Services) directly on the UI. It also includes an undo/redo history feature for robust content management.
- Inline Admin Editing: Administrators can edit content directly on pages that mirror the public UI.
- State Management & History: Built-in undo/redo functionality for content edits, with optimized localStorage usage to prevent quota exhaustion.
- Authentication & Security: Secure login mechanisms and role-based auth gating for admin routes.
- Media Management: Integrated with Cloudinary for seamless image uploads and masonry gallery management.
- Payments: Pre-configured integration with Paystack for processing transactions.
- Robust Database: Relational schema powered by Prisma ORM and PostgreSQL.
- Framework: Next.js (React)
- Database: PostgreSQL
- ORM: Prisma (Compatible with v6.0.0+)
- Image Hosting: Cloudinary
- Payments: Paystack
- Deployment: Configured for Render
Please refer to the following retained documents for more detailed information:
QUICK_START.md: Guide for initial database (Supabase/Neon) and environment setup.ARCHITECTURE_OVERVIEW.md: Deep dive into the system's structural design and admin implementation phases.
Docker Compose runs both the Next.js development server and PostgreSQL. Migrations are applied automatically after the database health check succeeds.
docker compose up --buildOpen http://localhost:3002 (the port selected in the included local .env to avoid other local services). Application source is bind-mounted for hot reload;
PostgreSQL data and container dependencies live in named volumes and are not
tracked by Git. Optional integrations can be added to a local .env file or a
Compose override without committing secrets.
The development stack applies migrations and idempotently seeds representative
content on startup. The default local admin login is admin@localhost.test /
ChangeMe123!; change DEV_ADMIN_EMAIL and DEV_ADMIN_PASSWORD in .env for
any shared environment.
Run unit and browser tests with:
npm test
npm run test:e2e