Skip to content

RubricLab/mmxxv

Repository files navigation

MMXXV

A prediction market game for 2025. Players create markets, make predictions, and compete for points based on their forecasting accuracy.

Tech Stack

  • Frontend

    • Next.js 15 (App Router)
    • TypeScript
    • Vanilla CSS with CSS Variables
    • @rubriclab/ui components
    • @rubriclab/auth for authentication
  • Backend

    • Prisma ORM with PostgreSQL
    • Next.js Server Actions
    • Resend for email notifications
  • Infrastructure

    • Vercel for deployment
    • Neon for PostgreSQL database
    • Resend for transactional emails
    • Biome for code formatting

Development Setup

Prerequisites

Environment Variables

Copy .env.example to .env and configure the following variables:

# App
URL                 # Base URL of the application (e.g., http://localhost:3000 for development)

# Database
DATABASE_URL        # PostgreSQL connection string from Neon (https://neon.tech)

# Email
RESEND_API_KEY     # API key from Resend.com for sending emails

Service Setup

  1. Database:

    • Create a new project on Neon
    • Copy the connection string from the dashboard
    • Make sure to append ?sslmode=require to the connection string
  2. Email:

    • Create an account on Resend
    • Get your API key from the dashboard
    • Verify your domain for production use
  3. Deployment:

    • We recommend Vercel for deployment
    • Connect your GitHub repository
    • Add the environment variables in Vercel's dashboard

You can also request access to a pre-configured .env file by emailing dexter@dexterstorey.com with subject: "URGENT ACCESS: MMXXV Dev Setup"

Getting Started

  1. Clone the repository:

    git clone https://github.com/RubricLab/mmxxv.git
    cd mmxxv
  2. Install dependencies:

    bun install
  3. Set up environment variables:

    • Copy .env.example to .env
    • Configure the variables as described above
  4. Initialize the database:

    bun db:generate
    bun db:push
  5. Start the development server:

    bun dev
  6. Open http://localhost:3000 in your browser

NixOS

Installing dependencies (bun install) fails because prisma doesn't release precompiled engine files for NixOS. Instead you can use a flake to let nix install the prisma engines which are then accessed via environment variables.

Project Structure

src/
├── app/                 # Next.js app router pages
├── lib/
│   ├── actions/        # Server actions
│   ├── components/     # React components
│   ├── services/      # Service layer
│   └── utils/         # Utility functions
└── schema/            # Prisma schema

Development Guidelines

Code Style

  • We use Biome for code formatting and linting
  • Run bun lint to check for issues
  • Run bun lint:fix to automatically fix issues
  • Run bun format to format code

Database Management

  • bun db:push - Push schema changes to database
  • bun db:generate - Generate Prisma client
  • bun db:studio - Open Prisma Studio

Contributing

We welcome contributions! Please feel free to submit a Pull Request.

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

Game Rules

For detailed information about how the game works, please visit the About page after setting up the project.

Support

If you encounter any issues or need help with development:

License

This project is licensed under "go nuts" - see the package.json file for details.