Skip to content

Cryptography solving race website, allowing people to compete to see who can solve ciphers faster.

Notifications You must be signed in to change notification settings

pedrocriado/CryptoRace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

131 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Express HTML5 GraphQL MongoDB NginX Node.JS React Redis Socket.IO TailwindCSS TypeScript Vite

CryptoRace

A competitive cryptography web application where users solve cryptography problems and compete on leaderboards.

Table of Contents

Overview

Crypto Racer is a platform for cryptography enthusiasts, ARG enthusiasts, and students. Users can create or join lobbies to solve cryptographic puzzles competitively. A leaderboard tracks user progress, highlighting the fastest solvers.

Features

  • Competitive cryptography puzzles
  • Real-time multiplayer functionality
  • Leaderboard with percentile rankings
  • User authentication (Google/GitHub sign-in)
  • Redis-backed real-time leaderboard
  • WebAssembly for faster cryptographic operations

Tech Stack

  • Frontend: React.js, HTML5, Tailwind CSS
  • Backend: Node.js, Express.js
  • Database: MongoDB, Redis
  • APIs: RESTapi, GraphQL, WebSocket
  • Cryptography: WebAssembly, C

Installation

  1. Clone the repository:
    git clone https://github.com/pedrocriado/CryptoRace
  2. Install dependencies:
    npm install
  3. Configure the .env file with necessary variables:
    PORT = 1234
    MONGO_URL = your-mongodb-url
    REDIS_URL = your-redis-url
    AUTH_SECRET = your-secret-key
  4. Start the development server:
    npm start

Usage

  1. Register or log in to your account.
  2. Create or join a lobby to start solving cryptographic puzzles.
  3. Compete with other players and track your progress on the leaderboard.

API Documentation

  • POST /auth/login: Logs in a user.
  • POST /auth/register: Registers a new user.
  • POST /auth/logout: Logs out a user.
  • DELETE /auth/delete: Deletes the current user. Along with the user, all associated information.
  • GET /leaderboard: Retrieves the top 10 leaderboard entries. If the user IS logged in then the user's entrie will be returned. If the user is NOT logged in then the returned user field will be null
  • GET /leaderboard/rank: Retrieves the users rank.
  • POST /leaderboard/addScore: Registers or Updates users rank. (The score that is being ranked is an average of all the best times)
  • POST /lobby/createLobby: If the user already has an active lobby, they will not be able to create a new one. The new lobby will have the options of:
    • A list of cryptographs
    • Name of the lobby
    • Player limit
    • Whether the lobby is private or not.
  • GET /lobby/joinLobby: when clicking on a open lobby, the API will return the 'lobbyId'. If the lobby is private, then it will authenticate the password provided by the user.
  • DELETE /lobby/deleteLobby: remove the user's own lobby

About

Cryptography solving race website, allowing people to compete to see who can solve ciphers faster.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published