Skip to content

Latest commit

 

History

History
352 lines (261 loc) · 8.84 KB

File metadata and controls

352 lines (261 loc) · 8.84 KB

🕹️ GAMIFY — Turn Any Goal into a Game

React Node.js Express MongoDB Discord.js License Contributors

🎯 An open-source platform to gamify productivity, collaboration, and community engagement.


💡Concept Note

Click here to learn more about the project.


📊 Project Statistics

GitHub Stars
Stars
GitHub Forks
Forks
GitHub Issues
Open Issues
Closed Issues
Closed Issues
Open PRs
Open PRs
Closed PRs
Closed PRs
GitHub Contributors
Contributors
Commits per Month
Commits
Repo Size
Project Size

📑 Table of Contents

💡 Why Choose Gamify?

  • 🆓 Free & Open-Source — MIT licensed and community-driven
  • 🛠️ Fully Self-Hostable — Complete control over your data and deployment
  • 🌍 Multi-Platform — Web dashboard and Discord integration
  • 🧱 Modular Architecture — Easy to customize and extend
  • 🎮 Gamify Anything — From study groups to corporate teams
  • 🧑‍🤝‍🧑 Built for Teams & Communities — Role-based collaboration baked in

🚀 Core Features

  • 🎯 Event Creation — Define your own events, tasks, and currency system
  • 👥 Role-Based Permissions — Owners, Admins, Moderators, Members
  • Task Management — Admins create tasks, moderators verify them
  • 🎁 Reward Store — Members redeem points for real or virtual rewards
  • 🖥️ Web Dashboard — Full-featured dashboard for managing events
  • 🤖 Discord Bot — Seamless interaction with Discord for members

🎉 Project Events & Highlights

Events Heading Events Heading


🧱 Tech Stack & Architecture

Directory Description Technology
client/ Frontend UI built with React React, Tailwind CSS
server/ RESTful API backend Node.js, Express
bot/ Discord companion bot Discord.js
Database Stores events, users, tasks, and rewards MongoDB

⚙ Folder Structures

Frontend folder structure

client/
├─ public/
│  └─ vite.svg
├─ src/
│  ├─ components/
│  │  ├─ Footer.jsx
│  │  ├─ Home.jsx
│  │  ├─ Navbar.jsx
│  │  └─ ScrollToTop.jsx
│  ├─ Context/
│  │  └─ AuthContext.jsx
│  ├─ pages/
│  │  ├─ About.jsx
│  │  ├─ AuthForms.jsx
│  │  ├─ Contact.jsx
│  │  ├─ Dashboard.jsx
│  │  └─ Profile.jsx
│  ├─ routes/
│  │  └─ ProtectedRoute.jsx
│  ├─ App.jsx
│  ├─ index.css
│  └─ main.jsx
└─ Additional Documentation

Backend folder structure

server/
├─ config/
│  └─ db.js
├─ controllers/
│  ├─ authController.js
│  └─ userController.js
├─ middlewares/
│  └─ authMiddleware.js
├─ models/
│  └─ User.js
├─ routes/
│  ├─ authRoutes.js
│  └─ userRoutes.js
└─ Additional Documentation

⚡ Quick Start / Installation

Prerequisites

  • Node.js (v16+)
  • MongoDB (Atlas or local)
  • A Discord Bot Token (Get one here)

1. Clone the Repository

git clone https://github.com/gollabharath/gamify.git
cd gamify

2. Install Dependencies

cd client && npm install
cd ../server && npm install
cd ../bot && npm install

3. Setup Environment Variables

Create .env files in client/, server/, and bot/ directories.

Example: server/.env

PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
FRONTEND_URL=your_frontend_url
EMAIL_USERNAME=your_email
EMAIL_PASSWORD=your_password

# Rate limiting for authentication endpoints
AUTH_LOGIN_MAX=10
AUTH_LOGIN_WINDOW_MS=900000
AUTH_REGISTER_MAX=5
AUTH_REGISTER_WINDOW_MS=3600000

Rate Limiting Configuration

The server includes rate limiting for authentication endpoints to prevent abuse:

  • Login Protection: AUTH_LOGIN_MAX attempts per AUTH_LOGIN_WINDOW_MS milliseconds (default: 10 per 15 minutes)
  • Registration Protection: AUTH_REGISTER_MAX attempts per AUTH_REGISTER_WINDOW_MS milliseconds (default: 5 per hour)

When limits are exceeded, endpoints return:

{
  "success": false,
  "message": "Too many login attempts. Try again later."
}

Example: bot/.env

DISCORD_TOKEN=your_discord_bot_token
GUILD_ID=your_guild_id
API_URL=http://localhost:5000

4. Run the App

In separate terminals:

# Terminal 1 (For Backend)
cd server && npm run dev

# Terminal 2 (For Frontend)
cd client && npm run dev

# Terminal 3 (For Bot)
cd bot && node index.js

🤝 Contributing

We love contributions from the community! To contribute:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

For major changes, please open an issue first to discuss what you’d like to change.


🎖️ Contributors

We are grateful to all the amazing contributors who have helped make this project better! 🌟

👨‍💻 Meet Our Contributors

Contributors


📄 License

This project is licensed under the MIT License.

License: MIT