A comprehensive, feature-rich web application for managing FiveM roleplay server applications, support tickets, user management, and administrative operations. Built with Next.js 15, TypeScript, and Discord OAuth integration with the help of AI.
JS-Applications is a modern, full-stack management system designed specifically for FiveM roleplay servers. It provides a complete solution for handling player applications, support tickets, announcements, shop integration, and administrative oversight with a beautiful, responsive UI.
- Multi-Type Applications: Support for custom application types with configurable fields
- Dynamic Form Builder: Create custom application forms with text, textarea, number, select, and checkbox fields
- Status Tracking: Manage applications through pending, approved, denied, and archived states
- Priority System: Four-level priority system (low, normal, high, urgent) with visual indicators
- Smart Filtering: Advanced filtering by status, priority, date range, age, and assigned staff
- Assignment System: Assign applications to specific staff members for review
- Notes System: Internal notes for staff communication on applications
- Application History: View complete history of all user applications
- Cooldown Management: Configurable cooldown periods between applications per type
- Duplicate Prevention: Prevent multiple pending or approved applications based on type settings
- Bulk Operations: Approve, deny, or delete multiple applications simultaneously
- Export Functionality: Export applications to CSV or JSON formats
- Application Drafts: Auto-save drafts to prevent data loss
- Multi-Category Tickets: Technical, rule violations, refunds, and general inquiries
- Priority Levels: Four-tier priority system with color coding
- Status Management: Open, in progress, resolved, and closed states
- Real-time Notifications: Notify users when staff replies to their tickets
- Admin Notifications: Alert staff when new tickets are created
- Note System: Add internal notes and public replies to tickets
- Priority Color Coding: Visual priority indicators across all ticket views
- Discord Integration: Automatic Discord notifications for ticket events
- Ban System: Temporary and permanent bans with expiration dates
- Blacklist System: Permanent blacklist with reason tracking
- Discord Integration: Seamless Discord OAuth authentication
- Role-Based Permissions: Granular permission system with custom roles
- User Activity Tracking: Complete audit trail of user actions
- Multiple Types: Maintenance, events, important updates, and community posts
- Priority Levels: High, medium, and low priority announcements
- Rich Content: Support for detailed announcement content
- Public Display: Beautiful announcement cards on homepage
- Admin Management: Full CRUD operations for announcements
- Comprehensive Dashboard: Overview of key metrics and statistics
- Application Statistics:
- Total applications with status breakdown
- Approval rates and average review times
- Applications by day chart
- Applications by admin performance tracking
- Activity Log: Complete audit trail of all administrative actions including:
- Application actions (created, approved, denied, archived, notes)
- User management (bans, blacklist operations)
- Ticket operations (created, updated, notes, deleted)
- Announcement management
- Rules updates
- Application type management
- Purchase tracking
- Bulk operations
- Notification Center:
- Application status changes
- Ticket creation and updates
- Mark as read functionality
- Stale application alerts (7+ days pending)
- Quick navigation to relevant items
- Rules Management: Visual rule editor with categories
- Template System: Save and reuse application response templates
- Modern Design: Clean, professional interface with Tailwind CSS
- Dark/Light Mode: Full theme support with system preference detection
- Responsive Layout: Mobile-first design that works on all devices
- Smooth Animations: Framer Motion animations for enhanced UX
- Loading States: Beautiful loading indicators
- Toast Notifications: Non-intrusive feedback for user actions
- Color-Coded Priority: Visual priority system across applications and tickets
- Discord OAuth 2.0: Secure authentication via Discord
- Session Management: NextAuth.js for session handling
- Role-Based Access Control: Granular permission system
- Protected Routes: Middleware-based route protection
- Server-Side Validation: All inputs validated server-side
- Server Rules Display: Public rules page with categorized sections
- About Page: Server information and details
- Discord Server Status: Real-time Discord server member count
- Shop Integration: PayPal integrated shop system
- Email Notifications: Optional email notifications (configurable)
- Data Persistence: JSON file-based storage (easily migrated to database)
- Next.js 15: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first CSS framework
- Framer Motion: Animation library
- Lucide React: Icon library
- Radix UI: Accessible UI components
- Next.js API Routes: Server-side API
- NextAuth.js: Authentication
- Node.js: Runtime environment
- File System: JSON-based data storage
- Discord API: OAuth and bot integration
- PayPal API: Payment processing
- Discord Webhooks: Notifications
- Node.js 18.x or higher
- npm or pnpm
- Discord Application (for OAuth)
- Discord Bot (for server integration)
- PayPal Business Account (for shop)
- Clone the repository
git clone https://github.com/yourusername/aura-applications.git
cd aura-applications- Install dependencies
npm install
# or
pnpm install- Create environment file
cp .env-
Configure environment variables (see Configuration section below)
-
Run development server (data files will be created automatically)
npm run dev
# or
pnpm dev- Open in browser:
http://localhost:3000
Note: The application automatically creates all required JSON data files in the
/datadirectory on first startup. No manual setup needed!
Create a .env file in the root directory with the following variables:
# NextAuth Configuration
# NextAuth Configuration
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key-here
# Discord OAuth
DISCORD_CLIENT_ID=your-discord-client-id
DISCORD_CLIENT_SECRET=your-discord-client-secret
# Discord Bot
DISCORD_BOT_TOKEN=your-bot-token
DISCORD_GUILD_ID=your-server-id
DISCORD_NOTIFICATION_CHANNEL_ID = your-notification-channel-id
DISCORD_PAYMENT_WEBHOOK_URL=your_webhook_url_here # Optional
# PayPal
NEXT_PUBLIC_PAYPAL_CLIENT_ID=your-paypal-client-id
PAYPAL_SECRET = your-paypal-secret
# Application Configuration
FIVEM_PLAYERS_JSON=your-players-json-url-here
FIVEM_INFO_JSON=your-info-json-url-here
CRON_SECRET= your-cron-secret-here- Create a bot at Discord Developer Portal
- Enable required intents:
- Server Members Intent
- Presence Intent
- Message Content Intent
- Invite bot to your server with Administrator permissions
- Copy bot token to
.env
- In Discord Developer Portal, go to OAuth2
- Add redirect URL:
http://localhost:3000/api/auth/callback/discord - Copy Client ID and Secret to
.env
- Go to your Discord server settings
- Copy role IDs for Admin, Moderator, and Reviewer roles
- Add to
.env
Configure custom application types in /admin/application-types:
- Set application names (e.g., "Staff Application", "Whitelist")
- Configure cooldown periods
- Set unique approval rules
- Allow/disallow multiple pending applications
- Create custom form fields
- Sign in with Discord using the button in the header
- Submit Application:
- Click "Apply" in navigation
- Select application type
- Fill out the form
- Submit for review
- Track Applications:
- View status in "My Applications"
- Receive notifications for status changes
- Create Support Tickets:
- Go to Support page
- Fill out ticket form with category and priority
- Track ticket status and replies
- Access Admin Panel via "Admin Panel" button (visible to staff)
- Review Applications:
- View all pending applications
- Filter and sort by priority/date
- Add internal notes
- Approve or deny with optional messages
- Assign to other staff members
- Manage Tickets:
- View all support tickets
- Update status and priority
- Reply to tickets
- Close resolved tickets
- User Management:
- Ban or blacklist users
- View user application history
- Configuration:
- Manage announcements
- Update server rules
- Create application types
- Configure shop products
- Edit
tailwind.config.tsfor color schemes - Modify
src/app/globals.cssfor global styles - Update theme provider in
src/app/components/theme-provider.tsx
- Replace logo in
/public/images/ - Update server name in
.env - Customize colors in Tailwind config
- Create custom field types in application type manager
- Support for text, textarea, number, select, and checkbox
- Required/optional field configuration
- Admin: Full access to all features
- Moderator: Application management, ticket management, user management
- Reviewer: Application review only (read-only for other features)
- User: Submit applications and tickets
| Feature | Admin | Moderator | Reviewer | User |
|---|---|---|---|---|
| Submit Application | β | β | β | β |
| Review Applications | β | β | β | β |
| Manage Tickets | β | β | β | β |
| Ban Users | β | β | β | β |
| Manage Announcements | β | β | β | β |
| Edit Rules | β | β | β | β |
| View Activity Log | β | β | β | β |
| Manage Shop | β | β | β | β |
Data is stored in JSON files in the /data directory:
applications.json- All applicationsapplication_drafts.json- Draft applicationsarchived_applications.json- Archived applicationsapplication-types.json- Application type configurationstickets.json- Support ticketsbans.json- Banned usersblacklist.json- Blacklisted usersnotifications.json- System notificationsannouncements.json- Server announcementsrules.json- Server rulesshop-products.json- Shop productsactivity_log.json- Complete audit trail
- Verify bot token in
.env - Check bot is in your server
- Ensure required intents are enabled
- Verify DISCORD_GUILD_ID matches your server
- Clear browser cookies
- Verify Discord OAuth redirect URL
- Check NEXTAUTH_URL matches your domain
- Regenerate NEXTAUTH_SECRET
- Ensure
/datadirectory exists and is writable - Check file permissions
- Verify no file locking issues
- Clear
.nextdirectory and rebuild:rm -rf .next && npm run dev - Check console for specific error messages
- Verify all environment variables are set
- Push code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
npm run build
npm startFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]To migrate from JSON files to a database:
- Install database adapter (e.g., Prisma, MongoDB)
- Create schemas matching JSON structures
- Write migration scripts to import JSON data
- Update API routes to use database queries
- Update activity log and notification systems
Example structure already supports easy migration due to well-defined TypeScript interfaces.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Database migration (PostgreSQL/MongoDB)
- Real-time updates with WebSockets
- Advanced analytics dashboard
- Mobile app (React Native)
- Multi-language support
- Advanced search with Elasticsearch
- File upload support for applications
- Interview scheduling system
- Automated application scoring
- Integration with more payment providers
For support, join our Discord support server or open an issue on GitHub.
- Original project: Aura Applications by Aura Development
- Next.js team for the amazing framework
- Vercel for hosting platform
- Radix UI for accessible components
- Tailwind CSS for styling system
- Discord for API and OAuth
Made with β€οΈ for FiveM Roleplay Communities