A modern web application for managing Minecraft servers hosted on Exaroton
Features • Tech Stack • Quick Start • Deployment • API • Contributing
- Google OAuth authentication via Firebase
- Role-based access control (Admin/User)
- Granular server access permissions
- Secure API key management
- Real-time server status monitoring
- Start, stop, and restart servers
- View online players
- Server console access
- File management (upload/download)
- Credits tracking and history
- Action logs with full audit trail
- Multi-language support (English & Portuguese)
- Dark/Light theme toggle
- PWA support for mobile devices
- Manage user permissions
- Grant/revoke server access
- Promote/demote administrators
- View activity history
| Category | Technologies |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript |
| Styling | Tailwind CSS, shadcn/ui |
| Backend | Next.js API Routes |
| Authentication | Firebase Auth |
| Database | Cloud Firestore |
| External API | Exaroton API |
| Deployment | Vercel |
- Node.js 18+
- npm or yarn
- Firebase project
- Exaroton account with API key
-
Clone the repository
git clone https://github.com/Lajuro/exaroton-servers.git cd exaroton-servers -
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env
Fill in your credentials (see Environment Variables below)
-
Run the development server
npm run dev
Create a .env file with the following variables:
# Firebase Configuration (from Firebase Console > Project Settings)
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
# Firebase Admin SDK (from Service Account JSON)
FIREBASE_ADMIN_PROJECT_ID=your_project_id
FIREBASE_ADMIN_CLIENT_EMAIL=firebase-adminsdk@your_project.iam.gserviceaccount.com
FIREBASE_ADMIN_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
# Exaroton API
EXAROTON_API_KEY=your_exaroton_api_key
# Optional: Cron Jobs
CRON_SECRET_KEY=your_secret_key_for_cron_jobs- Sign in with your Google account
- Manually set yourself as admin in Firestore:
- Go to Firebase Console > Firestore Database
- Find your user document in the
userscollection - Set
isAdminfield totrue
- Push your code to GitHub
- Import the project on Vercel
- Configure all environment variables
- Deploy!
Add to vercel.json for automatic credit tracking:
{
"crons": [{
"path": "/api/credits/auto-snapshot",
"schedule": "0 */6 * * *"
}]
}See the full API documentation in docs/API.md.
| Endpoint | Method | Description |
|---|---|---|
/api/servers |
GET | List all accessible servers |
/api/servers/[id] |
GET | Get server details |
/api/servers/[id]/start |
POST | Start a server |
/api/servers/[id]/stop |
POST | Stop a server |
/api/servers/[id]/restart |
POST | Restart a server |
/api/account |
GET | Get Exaroton account info |
/api/credits/history |
GET | Get credits history |
/api/users |
GET | List users (admin only) |
/api/history |
GET | Get action logs |
exaroton-servers/
├── app/
│ ├── api/ # API routes
│ │ ├── servers/ # Server control endpoints
│ │ ├── users/ # User management endpoints
│ │ ├── credits/ # Credits tracking endpoints
│ │ ├── account/ # Exaroton account endpoint
│ │ └── history/ # Action logs endpoint
│ ├── dashboard/ # User dashboard
│ ├── admin/ # Admin panel
│ ├── servers/[id]/ # Server details page
│ └── login/ # Login page
├── components/ # React components
│ └── ui/ # shadcn/ui components
├── lib/ # Utilities and configurations
│ ├── firebase.ts # Firebase client config
│ ├── firebase-admin.ts # Firebase Admin SDK
│ ├── exaroton.ts # Exaroton API client
│ └── auth-context.tsx # Auth context provider
├── types/ # TypeScript type definitions
├── messages/ # i18n translation files
├── docs/ # Documentation
└── scripts/ # Admin utility scripts
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Exaroton for the Minecraft server hosting platform and API
- Firebase for authentication and database services
- Vercel for hosting
- shadcn/ui for the beautiful UI components
Made with ❤️ by Roberto Camargo