Skip to content

moarsh17/HopelessOpus-25

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

232 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hopeless Opus - Backend Architecture

Overview

Hopeless Opus is an immersive online RPG and choice-based story web game developed for Acumen at TechTatva 2025.
The application features a dynamic branching narrative and more than 10 interactive minigames where player choices directly impact game progression and competitive scoring.

This repository contains the backend infrastructure that powers game logic, authentication, and real-time competitive ranking.


Impact and Scale

User Base - Successfully supported and managed concurrent game states for 300+ participating teams during the live event.

API Infrastructure - Designed and maintained 21+ REST API endpoints handling high-frequency read/write operations for story progression and minigame mechanics.

Latency - Maintained <200ms average response time for complex leaderboard aggregation queries.


Tech Stack

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB
  • ODM: Mongoose
  • Authentication: JSON Web Tokens (JWT), bcrypt
  • Services: Nodemailer for automated email workflows

Key Backend Features

1. Game State and Story Engine

  • Designed scalable MongoDB schemas to manage player progression across complex branching storylines.
  • Implemented secure stateful session management for 10+ minigames.
  • Prevented brute-force attempts on puzzles through controlled session validation.
  • Built transactional endpoints to safely:
    • decrement user tries
    • record level completions
    • award contextual rewards

2. Real-Time Leaderboard

  • Implemented optimized MongoDB aggregation pipelines to dynamically compute team rankings.
  • Enabled efficient ranking updates across 300+ competing teams.
  • Created protected routes that return:
    • global leaderboard
    • current authenticated user's rank

3. Secure Authentication Pipeline

  • Built a secure registration and login system using bcrypt password hashing and JWT authentication.
  • Implemented stateless authorization for scalable request validation.
  • Configured strict CORS policies and secure cookie handling for safe communication with the React/Vite frontend.
  • Added role-based access control (RBAC) for administrative operations.

4. Automated User Support

  • Integrated Nodemailer for automated password reset workflows.
  • Reduced manual support load during the event.
  • Implemented contact endpoints that route user queries directly to administrators.

Summary

The Hopeless Opus backend was engineered to support a large-scale competitive event, ensuring secure authentication, scalable game-state management, and real-time leaderboard performance. The architecture successfully handled hundreds of concurrent teams while maintaining low latency and reliable gameplay integrity.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors