GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - codegasms/mint: A platform to host programming contests or assignments for tech schools!

BranchesTags
Open more actions menu

Latest commit

 

History

573 Commits
573 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
app
app
 
 
components
components
 
 
contexts
contexts
 
 
data
data
 
 
db
db
 
 
docs
docs
 
 
hooks
hooks
 
 
lib
lib
 
 
middleware
middleware
 
 
migrations
migrations
 
 
mint
mint
 
 
prompts
prompts
 
 
public
public
 
 
reports
reports
 
 
scripts
scripts
 
 
styles
styles
 
 
tests
tests
 
 
utils
utils
 
 
.dockerignore
.dockerignore
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
TESTING.md
TESTING.md
 
 
bun.lock
bun.lock
 
 
components.json
components.json
 
 
docker-compose.yml
docker-compose.yml
 
 
drizzle.config.ts
drizzle.config.ts
 
 
jest.config.ts
jest.config.ts
 
 
jest.setup.ts
jest.setup.ts
 
 
middleware.ts
middleware.ts
 
 
next.config.js
next.config.js
 
 
next.config.mjs
next.config.mjs
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
postcss.config.mjs
postcss.config.mjs
 
 
tailwind.config.ts
tailwind.config.ts
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Mint

Mint is a modern, full-featured platform for conducting programming contests, managing coding problems, and building developer communities.


โœจ Features

  • ๐Ÿ† Host and manage programming contests
  • ๐Ÿ“š Organize and share coding problems
  • ๐Ÿ‘ฅ Multi-organization support
  • ๐Ÿ“Š Real-time monitoring and analytics (Prometheus)
  • ๐Ÿ”’ Secure authentication and user management
  • ๐Ÿ“ Interactive API documentation (Swagger)
  • โšก Fast, modern stack (Next.js, Bun, Drizzle, Tailwind CSS)

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 22.2.0+
  • Docker
  • Bun (recommended)

Setup

# 1. Clone the repository
bun install

# 2. Copy environment variables
cp .env.example .env

# 3. Start the database
bun pg

# 4. Run migrations and seed data
bun db:migrate
bun db:superuser  # Create an admin user
bun db:seed       # (Optional) Add test data

# 5. Start the development server
bun dev

Visit http://localhost:3000 to see the app.


๐Ÿ› ๏ธ Project Structure

mint/
โ”œโ”€โ”€ app/            # Next.js app router pages
โ”‚   โ”œโ”€โ”€ api-doc/    # Swagger API documentation
โ”‚   โ””โ”€โ”€ api/        # API routes
โ”œโ”€โ”€ components/     # React components
โ”œโ”€โ”€ db/             # Database schema and migrations
โ”œโ”€โ”€ lib/            # Utility functions and shared logic
โ”œโ”€โ”€ middleware/     # Request middleware (logging, metrics, error handling)
โ”œโ”€โ”€ public/         # Static assets
โ””โ”€โ”€ scripts/        # CLI scripts for development

โšก Available Commands

bun dev           # Start development server
bun build         # Build for production
bun start         # Start production server
bun lint          # Run ESLint
bun format        # Format code with Prettier
bun format:check  # Check code formatting

# Database
bun pg            # Start PostgreSQL container
bun pg:stop       # Stop and remove PostgreSQL container
bun pg-admin      # Start pgAdmin web interface
bun pg-admin:stop # Stop and remove pgAdmin container
bun db:migrate    # Generate and apply database migrations
bun db:seed       # Add test data to database
bun db:clear      # Clear all data from database
bun db:superuser  # Create an admin user interactively

๐Ÿงช Test Data

Seeding creates:

  • 2 Admin users
  • 3 Organizer users
  • 5 Regular users
  • 3 Organizations
  • 2 Problems, 2 Contests, 2 Groups per organization

All test users: password123


๐Ÿ“Š Monitoring & Metrics

  • Built-in Prometheus metrics: HTTP requests, user counts, DB query durations
  • Metrics endpoint: http://localhost:3000/api/metrics

Prometheus config:

scrape_configs:
  - job_name: 'mint'
    static_configs:
      - targets: ['localhost:3000']
    metrics_path: '/api/metrics'

๐Ÿฉบ Troubleshooting

  • Reset containers:
    docker stop mint-postgres mint-pgadmin
    docker rm mint-postgres mint-pgadmin
  • Check ports:
    sudo lsof -i :5432  # PostgreSQL
    sudo lsof -i :5050  # pgAdmin
  • Full reset:
    bun pg:stop && bun pg-admin:stop && bun pg && bun pg-admin && bun db:clear && bun db:migrate && bun db:seed

Note: You can use npm run instead of bun if preferred.


๐Ÿค Contributing

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

๐Ÿ“„ License


๐Ÿ“š API Documentation

  • Interactive docs at /api-doc (dev server)
  • Request/response examples
  • API endpoint testing interface

Add docs to API routes:

/**
 * @swagger
 * /api/your-endpoint:
 *   get:
 *     summary: Endpoint description
 *     responses:
 *       200:
 *         description: Success response
 */

๐Ÿ”‘ Environment Variables

Copy .env.example to .env and fill in:

DATABASE_URL=postgres://postgres:postgres@localhost:5432/mint

# Email Configuration
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=[email protected]
SMTP_PASSWORD=your-smtp-password
SMTP_FROM_NAME=Mint Platform
SMTP_FROM_EMAIL=[email protected]

Gmail setup:

  • Enable 2FA
  • Generate an app password
  • Use as SMTP_PASSWORD
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=[email protected]
SMTP_PASSWORD=your-app-specific-password

About

A platform to host programming contests or assignments for tech schools!

parixa.ink

Topics

assignmentcontestcontests-platformlmsonline-judgeprogramming-judge

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.