- Node.js 18+ installed
- MongoDB Atlas account (or local MongoDB)
- Docker (optional, for containerized deployment)
git clone <repository-url>
cd MyPentest-Dashboard
npm install
cd backend && npm install
cd ../frontend && npm installCreate a .env file in the root directory:
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/pentest-dashboard
JWT_SECRET=your-super-secret-jwt-key-change-in-production
JWT_REFRESH_SECRET=your-super-secret-refresh-key-change-in-production
BACKEND_PORT=4000
FRONTEND_PORT=3000
NODE_ENV=development
CORS_ORIGIN=http://localhost:3000Option A: Using npm scripts (recommended for development)
# Terminal 1: Start backend
cd backend
npm run dev
# Terminal 2: Start frontend
cd frontend
npm run devOption B: Using Docker Compose (MongoDB only)
# Start MongoDB
docker-compose -f docker-compose.dev.yml up -d
# Start backend and frontend locally
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:4000
- Health check: http://localhost:4000/health
The application requires authentication. You can:
-
Register via API:
curl -X POST http://localhost:4000/api/auth/register \ -H "Content-Type: application/json" \ -d '{ "username": "admin", "email": "admin@example.com", "password": "admin123", "role": "admin" }'
-
Or use the import script (creates default admin user):
node scripts/import-notion.js /path/to/notion/export
Default credentials:
- Email:
admin@pentest.local - Password:
admin123
- Email:
# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down-
Export from Notion:
- Go to Settings & Members → Export
- Select HTML format
- Download and unzip the export
-
Run Import Script:
# Install script dependencies cd scripts npm install # Run import node import-notion.js /path/to/notion/export
MyPentest-Dashboard/
├── backend/ # Express API server
│ ├── src/
│ │ ├── models/ # MongoDB schemas
│ │ ├── routes/ # API routes
│ │ ├── middleware/ # Auth middleware
│ │ └── server.ts # Entry point
│ └── package.json
├── frontend/ # Next.js application
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ ├── lib/ # Utilities and API client
│ └── package.json
├── scripts/ # Utility scripts
│ └── import-notion.js
├── docker-compose.yml
├── Dockerfile
└── README.md
curl -X POST http://localhost:4000/api/projects \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "My Pentest Project",
"slug": "my-pentest-project",
"description": "Project description",
"tags": ["web", "api"]
}'curl -X POST http://localhost:4000/api/tasks \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Test SQL Injection",
"projectId": "PROJECT_ID",
"status": "todo",
"priority": "high"
}'- Verify
MONGODB_URIis correct - Check MongoDB Atlas IP whitelist
- Ensure network connectivity
- Change ports in
.envfile - Update
CORS_ORIGINaccordingly
- Clear
node_modules:rm -rf node_modules && npm install - Ensure Node.js 18+ is installed
- Check TypeScript version compatibility
- Ensure MongoDB is running and accessible
- Check that models are compiled (run
npm run buildin backend first) - Verify export path is correct
- Read DEPLOYMENT.md for production deployment
- Check ACCEPTANCE_CRITERIA.md for feature list
- Explore the API endpoints in
backend/src/routes/ - Customize the UI in
frontend/components/
For issues or questions:
- Check the documentation files
- Review error logs in console
- Verify environment variables are set correctly