Skip to content

Android-Club-VITC/Feature-quest

Repository files navigation

Feature Quest Website

Features

  • User Authentication: Secure authentication with Better Auth
  • Team Management: Create, join, and manage teams
  • Admin Panel: Administrative controls for user and team management
  • Leaderboard: Competitive ranking system for verified teams
  • Real-time Updates: Modern React Query integration

Tech Stack

  • Frontend: Next.js 16, React 19, TypeScript
  • Styling: Tailwind CSS, Radix UI components
  • Backend: Next.js API routes
  • Database: MongoDB with Mongoose
  • Authentication: Better Auth
  • State Management: React Query (TanStack Query)
  • Email: Nodemailer

Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB
  • npm or yarn

Installation

  1. Clone the repository:
git clone <repository-url>
cd club-management-system
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env

Configure the following variables in .env:

# Database
MONGODB_URI=mongodb://localhost:27017/club-management

# Better Auth
BETTER_AUTH_SECRET=your-secret-key
BETTER_AUTH_URL=http://localhost:3000

# Email (optional)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 in your browser.

Project Structure

src/
├── app/                    # Next.js app directory
│   ├── (admin)/           # Admin routes
│   ├── (auth)/            # Authentication routes
│   ├── (private)/         # Protected user routes
│   ├── (public)/          # Public routes
│   └── api/               # API routes
├── components/            # Reusable components
│   ├── ui/               # UI components (shadcn/ui)
│   ├── admin/            # Admin-specific components
│   └── team/             # Team-related components
├── lib/                  # Utility libraries
├── models/               # Database models
├── services/            # API service functions
└── types/               # TypeScript type definitions

API Documentation

Comprehensive API documentation is available in API_DOCUMENTATION.md.

Key Endpoints

  • Teams: /api/teams/* - Team creation, joining, leaving
  • Admin: /api/admin/* - Administrative functions
  • Leaderboard: /api/leaderboard - Team rankings
  • Auth: /api/auth/* - Authentication (Better Auth)

Available Scripts

# Development
npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server

# Code Quality
npm run lint         # Run ESLint

Environment Variables

See .env.example for all required environment variables.

Required Variables

  • MONGODB_URI: MongoDB connection string
  • BETTER_AUTH_SECRET: Secret key for Better Auth
  • BETTER_AUTH_URL: Base URL for the application
  • GOOGLE_CLIENT_ID:
  • GOOGLE_CLIENT_SECRET:

Optional Variables

  • SMTP_*: Email configuration for notifications

Database Schema

Users Collection

{
  _id: ObjectId,
  name: String,
  email: String,
  image: String,
  emailVerified: Boolean,
  banned: Boolean,
  banReason: String,
  banExpires: Date,
  teamId: ObjectId, // Reference to team
  createdAt: Date
}

Teams Collection

{
  _id: ObjectId,
  name: String,
  joinCode: String,
  members: [ObjectId], // User references
  teamleadId: ObjectId, // User reference
  pointsEarned: Number,
  currentPoints: Number,
  isVerified: Boolean,
  createdAt: Date
}

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

License

This project is licensed under the MIT License.

Support

For questions or support, please contact the development team.


Built with ❤️ using Next.js and TypeScript

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages