NXAD (NX Attack And Defense) is a Next.js platform for Attack-Defense style cybersecurity competitions. It includes team login, flag submission, scoreboard, chat, passive points, and an admin dashboard.
- Next.js 15
- React 19
- TypeScript
- Tailwind CSS
- MongoDB + Mongoose
- Docker Compose
src/
├── app/
├── components/
├── hooks/
├── lib/
├── models/
└── middleware.ts
scripts/
└── setup-database.jsRoot files are kept for framework and tooling configuration only.
Create your local env file:
cp .env.example .envSet at least these values before setup:
MONGODB_URI=mongodb://localhost:27017/nxad
MONGODB_DATABASE=nxad
ADMIN_USERNAME=admin
ADMIN_PASSWORD=change-meDo not edit scripts/setup-database.js just to change credentials. Use .env instead.
Install dependencies:
pnpm installRun MongoDB locally, then initialize the database:
ADMIN_USERNAME=admin ADMIN_PASSWORD=change-me MONGODB_DATABASE=nxad mongosh --file scripts/setup-database.jsStart development server:
pnpm devOpen http://localhost:3000.
Admin panel: http://localhost:3000/admin/login
Create .env first, then run:
docker compose up -d --buildStop services:
docker compose downpnpm build- Admin credentials are sourced from
.env. - If the seeded admin password is plaintext, the app hashes it automatically on first successful login.
- Competition scoring defaults are configured in
.env.exampleand can also be changed from the admin config page at runtime.