A modern, open-source attack surface management dashboard built with Next.js, TypeScript, and MongoDB. Monitor your organization's external assets including SSL certificates, DNS records, IP addresses, and port scans in a unified interface.
- π‘οΈ SSL Certificate Monitoring - Track expiration dates, certificate chains, and security status
- π DNS Records Management - Monitor DNS configurations, detect changes, and track record types
- π IP Address Tracking - Comprehensive IP address and infrastructure monitoring across cloud providers
- π Port Scan Analysis - Security assessment, open port detection, and vulnerability tracking
- πΈ Website Screenshots - Capture and view screenshots of endpoints
- π Real-time Analytics - Interactive charts and data visualization with filtering
- π¨ Modern UI - Responsive design with dark/light theme support
- π Role-based Access Control - Admin, editor, and viewer roles with granular permissions
- π Advanced Search - Real-time search and multi-criteria filtering
- π€ Data Export - Export data to CSV and JSON formats
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Database: MongoDB
- Authentication: NextAuth.js with Google OAuth
- UI Components: Radix UI, Tailwind CSS
- Charts: Recharts, Chart.js
- Screenshots: Puppeteer
- Node.js 18+
- MongoDB (local or Atlas)
- Google OAuth credentials (for authentication)
-
Clone the repository
git clone https://github.com/groww-oss/apollo-dashboard.git cd apollo-dashboard -
Install dependencies
npm install
-
Configure environment variables
cp env-example.txt .env.local
-
Update
.env.localwith your configuration (see Environment Variables) -
Start the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
Before users can sign in, you need to create the first admin user:
curl -X POST http://localhost:3000/api/users/init \
-H "Content-Type: application/json" \
-d '{
"email": "admin@example.com",
"name": "Admin User",
"secret": "your-system-init-key"
}'Replace your-system-init-key with your SYSTEM_MAINTENANCE_KEY from .env.local.
# Build the image
docker build -t apollo-dashboard .
# Run the container
docker run -p 3000:3000 \
-e MONGODB_URI="mongodb://host.docker.internal:27017/Appollo" \
-e NEXTAUTH_URL="http://localhost:3000" \
-e NEXTAUTH_SECRET="your-secret" \
-e GOOGLE_CLIENT_ID="your-client-id" \
-e GOOGLE_CLIENT_SECRET="your-client-secret" \
apollo-dashboardThe dashboard expects these collections in your MongoDB database:
| Collection | Description |
|---|---|
SSL Certificates |
SSL certificate data with expiration tracking |
IP Records |
IP address information and infrastructure data |
Port Scans |
Port scan results and security assessments |
DNS |
DNS records and configuration data |
users |
User accounts and permissions |
| Variable | Description |
|---|---|
MONGODB_URI |
MongoDB connection string |
NEXTAUTH_URL |
Your application URL (e.g., http://localhost:3000) |
NEXTAUTH_SECRET |
Random secret for NextAuth.js session encryption |
GOOGLE_CLIENT_ID |
Google OAuth client ID |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret |
| Variable | Description | Default |
|---|---|---|
SYSTEM_MAINTENANCE_KEY |
Secret key for initial admin user creation | - |
ALLOWED_EMAIL_DOMAIN |
Restrict sign-in to specific email domain (e.g., example.com) |
All domains |
NEXT_PUBLIC_REFETCH_INTERVAL |
Data refresh interval in ms | 300000 |
NEXT_PUBLIC_DASHBOARD_REFETCH_INTERVAL |
Dashboard refresh interval in ms | 30000 |
PUPPETEER_EXECUTABLE_PATH |
Path to Chrome binary for screenshots | Auto-detected |
- Go to Google Cloud Console
- Create a new project or select existing one
- Navigate to APIs & Services β Credentials
- Click Create Credentials β OAuth client ID
- Select Web application
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy the Client ID and Client Secret to your
.env.local
βββ app/ # Next.js app directory
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ dns/ # DNS records API
β β βββ ips/ # IP records API
β β βββ port-scans/ # Port scans API
β β βββ ssl-certificates/ # SSL certificates API
β β βββ users/ # User management API
β βββ auth/ # Authentication pages
β βββ dns/ # DNS records page
β βββ endpoints/ # Endpoints page
β βββ ips/ # IP addresses page
β βββ port-scans/ # Port scans page
β βββ ssl-certificates/ # SSL certificates page
β βββ users/ # User management page
βββ components/ # Reusable UI components
β βββ dashboard/ # Dashboard-specific components
β βββ ui/ # Generic UI components
βββ lib/ # Utility functions and configurations
β βββ auth.ts # NextAuth configuration
β βββ mongodb.ts # MongoDB connection
β βββ permissions.ts # Role-based permissions
βββ types/ # TypeScript type definitions
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/ssl-certificates |
SSL certificate records |
| GET | /api/ssl-certificates/stats |
SSL statistics |
| GET | /api/ips |
IP address records |
| GET | /api/ips/stats |
IP statistics |
| GET | /api/port-scans |
Port scan results |
| GET | /api/port-scans/stats |
Port scan statistics |
| GET | /api/dns |
DNS records |
| GET | /api/dns/stats |
DNS statistics |
| GET | /api/endpoints |
All endpoints |
| GET | /api/stats |
Overall dashboard statistics |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/users |
List all users |
| POST | /api/users |
Create new user |
| PUT | /api/users/[id] |
Update user |
| DELETE | /api/users/[id] |
Delete user |
| POST | /api/users/init |
Initialize first admin |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/system/health |
Health check |
| Role | Permissions |
|---|---|
| Admin | Full access: view all data, manage users, export data |
| Editor | View and modify data, export data |
| Viewer | Read-only access to data |
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linting
npm run lint
# Type checking
npm run type-checkContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run linting and type checking (
npm run lint && npm run type-check) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Add TypeScript types for new code
- Update documentation for new features
- Test your changes thoroughly
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework
- Radix UI - Accessible UI components
- Tailwind CSS - Utility-first CSS framework
- Lucide Icons - Beautiful icons