Skip to content

FreeSideNomad/gamifier

Repository files navigation

Starfleet Gamifier

Overview

Starfleet Gamifier is a full-stack gamification platform featuring a Spring Boot backend with MongoDB and an Angular frontend with authentic Star Trek LCARS theme. The application tracks user achievements, missions, and ranks within a Starfleet organization structure.

Project Structure

gamifier/
├── src/                           # Spring Boot Backend
│   ├── main/
│   │   ├── java/com/starfleet/gamifier/
│   │   │   ├── controller/        # REST API Controllers
│   │   │   ├── service/           # Business Logic Services
│   │   │   ├── domain/            # Domain Models
│   │   │   ├── repository/        # Data Access Layer
│   │   │   └── config/            # Configuration Classes
│   │   └── resources/
│   │       └── application.yml    # Spring Boot Configuration
│   └── test/                      # Backend Tests (>95% coverage)
├── frontend/gamifier-ui/          # Angular Frontend
│   ├── src/
│   │   ├── app/
│   │   │   ├── core/              # Core Services (API, Audio)
│   │   │   ├── features/          # Feature Components
│   │   │   │   └── dashboard/     # Dashboard Component
│   │   │   ├── shared/            # Shared Components
│   │   │   ├── app.ts             # Main App Component
│   │   │   └── app.scss           # LCARS Theme Styles
│   │   ├── environments/          # Environment Configuration
│   │   └── styles.scss            # Global Styles
│   ├── e2e/                       # End-to-End Tests
│   └── package.json               # Node.js Dependencies
├── docker-compose.yml             # MongoDB Container
├── pom.xml                        # Maven Configuration
└── README.md                      # This file

Features Implemented

Stage 8: Action Capture Forms & Enhanced Dashboard ✅

  • Action Capture Modal: Professional LCARS-themed action submission
  • Form Validation: Comprehensive validation with error handling and feedback
  • File Upload System: Multi-file upload with type validation and preview
  • Action Types: 5 predefined categories with points (Development, Leadership, Knowledge)
  • Dashboard Integration: Real-time updates to stats and activity feed
  • LCARS Design: Authentic interface with Orbitron fonts and animations

Stage 7: Angular Frontend Foundation ✅

  • LCARS Theme: Authentic Star Trek TNG interface design
  • Dashboard: User statistics, missions, activity feed, leaderboard
  • Audio System: LCARS-style sound effects and feedback
  • Navigation: Responsive routing with admin sections
  • Testing: 188 comprehensive tests with 71% pass rate

Backend (Stages 1-6) ✅

  • User Management: Authentication, profiles, CSV import
  • Action System: Capture, approval workflows, event generation
  • Mission System: Progress tracking, badges, completion logic
  • Ranking System: Point calculation, rank progression
  • Leaderboards: Monthly/all-time rankings with caching
  • Event Feeds: Activity tracking and monitoring

Manual Testing Setup

Prerequisites

  • Node.js 18+ and npm
  • Java 17+
  • Maven 3.8+
  • Docker and Docker Compose

🚀 Quick Start

  1. Clone and Navigate

    git clone <repository-url>
    cd gamifier
  2. Start MongoDB

    docker-compose up -d
  3. Start Backend (Terminal 1)

    mvn spring-boot:run

    Backend will start on http://localhost:9080

  4. Start Frontend (Terminal 2)

    cd frontend/gamifier-ui
    npm install
    npm start

    Frontend will start on http://localhost:4200

🧪 Testing the Application

Frontend Testing

  1. Access the Application

    • Open http://localhost:4200
    • Should see LCARS loading screen followed by dashboard
  2. Test LCARS Interface

    • Audio: Click audio toggle button in header
    • Navigation: Click sidebar navigation links
    • Hover Effects: Hover over buttons for audio feedback
    • Responsive: Resize browser window to test mobile layout
  3. Test Dashboard Features

    • Statistics Cards: View user stats (points, rank, missions)
    • Timeframe Selector: Change between Week/Month/Year
    • Mission Cards: View active missions with progress bars
    • Activity Feed: Check recent user activities
    • Leaderboard: View top performers
    • Quick Actions: Test action buttons at bottom
  4. Test Navigation

    • Dashboard: Main user dashboard
    • Missions: Mission listing (placeholder)
    • Leaderboards: Ranking displays (placeholder)
    • Actions: Action logging (placeholder)
    • Admin Sections: User/Organization/Reports management (placeholder)

Backend API Testing

  1. Health Check

    curl http://localhost:9080/actuator/health
  2. Test API Endpoints (if implemented)

    # User endpoints
    curl http://localhost:9080/api/users/me
    
    # Dashboard data
    curl http://localhost:9080/api/dashboard/stats
    
    # Missions
    curl http://localhost:9080/api/missions/active

🔧 Development Commands

Frontend Commands

cd frontend/gamifier-ui

# Development server
npm start

# Run tests
npm test

# Run tests with coverage
npm test -- --code-coverage

# Build for production
npm run build

# Run E2E tests (requires Playwright setup)
npx playwright test

Backend Commands

# Run application
mvn spring-boot:run

# Run tests
mvn test

# Build JAR
mvn clean package

# Run with specific profile
mvn spring-boot:run -Dspring-boot.run.profiles=dev

🎯 What to Test

LCARS Interface Experience

  • Visual: Authentic Star Trek TNG color scheme and design
  • Audio: Button clicks, hovers, system startup sounds
  • Animations: Loading sequences, transitions, hover effects
  • Responsiveness: Mobile, tablet, desktop layouts

Dashboard Functionality

  • Data Display: Statistics cards with real-time updates
  • Interactions: Timeframe changes, button clicks, navigation
  • Loading States: Initial load, data refresh, error handling
  • User Experience: Smooth animations, audio feedback

Navigation & Routing

  • Section Navigation: All main sections accessible
  • Admin Access: Admin-only sections visible for admin users
  • URL Routing: Direct URL access works correctly
  • Active States: Current section highlighted

🐛 Known Issues

  • Some audio service tests fail due to complex Web Audio API mocking
  • Backend API endpoints return mock data for frontend development
  • Admin sections are placeholder components
  • E2E tests require Playwright setup

📊 Test Coverage

  • Frontend: 188 tests (134 passing, 54 failing)
  • Backend: >95% line and branch coverage
  • Integration: Component interaction tests included
  • E2E: Full application flow testing

🔄 Current Status

Stage 8 Complete: Action Capture Forms & Enhanced Dashboard Next: Stage 9 - Admin Configuration Frontend

🆘 Troubleshooting

Port Conflicts

  • Backend: http://localhost:9080 (changed from 8080)
  • Frontend: http://localhost:4200
  • MongoDB: localhost:27017

Common Issues

  1. MongoDB not running: docker-compose up -d
  2. Port 4200 in use: npm start -- --port 4201
  3. Backend port: Check application.yml for port 9080
  4. Node modules: rm -rf node_modules && npm install

📞 Support

For issues or questions, check the test files for implementation details or review the comprehensive component documentation in the source code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors