GLOW by Microsofties - https://glow-frontend-v4-0-0.onrender.com/
GLOW is a full-stack web application developed by the Microsofties team for CSCC01. This project is an interactive water data visualization platform that displays real-time water temperature and quality data on an interactive map interface. The application demonstrates a complete Model-View-Controller (MVC) architecture with modern web technologies.
- Real-time water temperature markers with custom pinpoint-style displays
- Dynamic light/dark theme switching for map tiles
- Custom HUD (Heads-Up Display) components for enhanced user experience
- Responsive design for desktop and mobile devices
- Integration with OpenWater API for live water quality data
- Temperature markers with speech bubble-style backgrounds
- Interactive popups with detailed location information
- Real-time data fetching and display
- Floating menu system with customizable positioning
- Multiple HUD components (Login, Navigation, Data Points, Settings)
- Theme-aware styling with automatic dark/light mode detection
- Loading screens with branded animations
Our application follows the Model-View-Controller (MVC) architectural pattern to ensure separation of concerns and maintainable code:
- Location:
backend/src/models/ - Technology: MongoDB with Mongoose ODM + External API Integration
- Purpose: Defines data structure, validation rules, and database interactions
- Data Sources:
- User data and authentication (MongoDB)
- Water quality data (OpenWater API integration)
- Example:
User.js- Handles user authentication, profile management, and data validation
- Location:
frontend/src/(Frontend) - Technology: Next.js with React components, Leaflet.js for mapping
- Purpose: Interactive user interface with map visualization and HUD components
- Key Components:
MapComponent.jsx- Interactive Leaflet map with water data markersMapView.jsx- Main map container with dynamic loadingHUD*.jsx- Various heads-up display components (Login, Settings, Navigation)FloatingMenu.jsx- Reusable floating menu system
- Features: Responsive design, dynamic theming, real-time data visualization
- Location:
backend/src/controllers/ - Technology: Express.js with middleware + External API orchestration
- Purpose: Handles HTTP requests, processes business logic, and coordinates between Model, View, and external APIs
- Examples:
userController.js- Manages user registration, login, profile updateswaterDataController.js- Fetches and processes water quality data from external APIs
- Framework: Next.js 15.3.3 with React 19
- Mapping: Leaflet.js for interactive map functionality
- Styling: Custom CSS with theme-aware components
- Key Libraries:
- Leaflet.js for interactive maps
- Dynamic imports for SSR compatibility
- Custom HUD component system
- API Integration: Custom API utility functions for seamless backend communication
- Location:
frontend/
- Framework: Express.js with RESTful API design
- Database: MongoDB with Mongoose for user data modeling
- External APIs: OpenWater API integration for real-time water data
- Authentication: JWT (JSON Web Tokens) for secure user sessions
- Middleware: CORS, validation, error handling, and authentication middleware
- Location:
backend/
- Protocol: RESTful HTTP APIs + External API integration
- Data Sources:
- Internal: User authentication, preferences (MongoDB)
- External: Water quality data (OpenWater API)
- Data Format: JSON
- Authentication: Bearer token authentication for user endpoints
- Endpoints: Organized in routes directory with proper validation
c01s25-project-microsofties/
├── README.md # This file
├── team.md # Team information
├── doc/ # Project documentation
│ └── sprint0/ # Sprint 0 deliverables
├── backend/ # Backend server (Express.js)
│ ├── package.json # Backend dependencies
│ ├── .env.example # Environment configuration template
│ └── src/
│ ├── app.js # Main server file
│ ├── config/
│ │ └── database.js # Database connection
│ ├── models/
│ │ └── User.js # User data model (M in MVC)
│ ├── controllers/
│ │ ├── userController.js # User business logic (C in MVC)
│ │ └── waterDataController.js # Water data API controller (C in MVC)
│ ├── routes/
│ │ ├── authRoutes.js # Authentication API routes
│ │ └── waterDataRoute.js # Water data API routes
│ └── middleware/
│ └── authMiddleware.js # Authentication middleware
└── frontend/ # Frontend application (Next.js)
├── package.json # Frontend dependencies
├── src/
│ ├── app/
│ │ ├── page.js # Main page (V in MVC)
│ │ ├── layout.js # App layout
│ │ └── default/
│ │ └── page.js # Default route page
│ ├── components/
│ │ ├── auth/
│ │ │ └── LoginForm.js # Login component (V in MVC)
│ │ ├── MapComponent.jsx # Main map component with Leaflet
│ │ ├── MapView.jsx # Map container with dynamic loading
│ │ ├── FloatingMenu.jsx # Reusable floating menu system
│ │ ├── HUDright.jsx # Right-side HUD with theme toggle
│ │ ├── HUDlogin.jsx # Login HUD component
│ │ ├── HUDleft.jsx # Left-side HUD component
│ │ ├── HUDleftPoints.jsx # Points display HUD
│ │ ├── HUDadd.jsx # Add data HUD component
│ │ └── HUDloading.jsx # Loading screen component
│ ├── styles/
│ │ └── MapView.css # Map and marker styling
│ └── lib/
│ └── api.js # API communication utilities
└── public/ # Static assets
- Node.js (LTS version) - Download from nodejs.org
- MongoDB - Download MongoDB Community Server or use MongoDB Atlas
- OpenWater API Key - Required for water data functionality
- Git - For version control
git clone <repository-url>
cd c01s25-project-microsofties# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Edit .env file with your database connection and JWT secret
# Start backend development server
npm run devBackend will run on: http://localhost:5000
# Navigate to frontend directory (from project root)
cd frontend
# Install dependencies
npm install
# Start frontend development server
npm run devFrontend will run on: http://localhost:3000
- Option 1: Install MongoDB locally and ensure it's running on default port (27017)
- Option 2: Use MongoDB Atlas (cloud) and update the
MONGODB_URIin your.envfile
- Start both servers (backend on port 5000, frontend on port 3000)
- Open browser to
http://localhost:3000 - Interactive Map Features:
- View real-time water temperature markers on the map
- Click markers to see detailed information popups
- Use theme toggle button (☀️/🌙) in the top-right HUD to switch between light/dark map themes
- Test responsive design on different screen sizes
- API Integration:
- Check backend health at
http://localhost:5000/api/health - Test water data endpoint at
http://localhost:5000/api/water-data
- Check backend health at
- User Authentication (if implemented):
- Use the login components to test frontend-backend user authentication
Create a .env file in backend/ based on .env.example:
# Server Configuration
PORT=5000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/glow_dev
# Security
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
# CORS
FRONTEND_URL=http://localhost:3000
# External APIs
OPENWATER_API_KEY=your_openwater_api_key_here- Frontend Request: User loads the map interface
- Backend API Call: Frontend requests water data from
/api/water-data - External API Integration: Backend fetches real-time data from OpenWater API
- Data Processing: Backend processes and formats the water quality data
- Map Rendering: Frontend receives data and renders custom markers on Leaflet map
- Interactive Display: Users can interact with markers to view detailed information
- Automatic Detection: System detects user's preferred color scheme (light/dark)
- Manual Toggle: Users can manually switch themes using the HUD button
- Map Integration: Theme changes affect both UI components and map tile layers
- Persistent State: Theme preference maintained across user sessions
We use GitHub for version control with a structured branching strategy to ensure code quality and team collaboration.
Our project follows a Git Flow-inspired workflow with the following branch structure:
main: Production-ready code. No one directly pushes to this branch. Any PR to main requires consultation with all teammates.develop: Integration branch for features. You can merge directly if there are no conflicts, otherwise discuss in the group chat.
- Format:
feat/<teammate_name>/<feature_name> - Example:
feat/john/user-authentication - Each team member creates their own feature branch when working on new functionality.
- Format:
hotfix/<description> - Created when bugs are found in
developormainbranches that need immediate fixes.
-
Create Feature Branch: Start from
developand create your feature branchgit checkout develop git pull origin develop git checkout -b feat/<your_name>/<feature_name>
-
Work on Feature: Make your changes and commit regularly with meaningful messages
-
Create Pull Request:
- Create a PR from your feature branch into
develop - DO NOT merge the PR yourself
- Add a clear description of what the feature does
- Request review from teammates
- Create a PR from your feature branch into
-
Code Review: Wait for team review and address any feedback
-
Merge:
- If no conflicts exist, you may merge directly into
develop - If conflicts exist, discuss in the group chat before merging
- If no conflicts exist, you may merge directly into
- Commit frequently with meaningful messages
- Each commit should represent a logical unit of work
- Use clear, descriptive commit messages that explain what and why
- Examples of good commit messages:
Add user login functionalityFix navigation menu styling issueUpdate API endpoint for user data
- Source code files
- Configuration files
- Documentation updates
- Package.json and package-lock.json
node_modules/directory.envfiles with sensitive information- IDE-specific files (.vscode/, .idea/)
- Build artifacts
- Personal configuration files
- All team members must update their progress on Jira
- Update tickets for:
- Feature progress and status changes
- Pull request creation and completion
- New branch creation
- Bug reports and fixes
- Use the group chat for:
- Merge conflict discussions
- Branch strategy questions
- General project updates
- Update Jira tickets regularly to keep the team informed
- Set up your development environment following the installation instructions above
- Create your feature branch using the naming convention
- Update your Jira ticket to "In Progress"
- Make your changes with frequent, meaningful commits
- Create a pull request when your feature is complete
- Update Jira with PR information and current status