Skip to content

CodeLegends is a platform for learning programming through interactive challenges. This repository contains the source code and resources for the CodeLegends project.

Notifications You must be signed in to change notification settings

flavioialongo/code_legends

 
 

Repository files navigation

Code Legends

Welcome to Code Legends, a Ruby on Rails application where users can challenge each other in coding duels. Each match generates a random challenge from a pool of existing challenges in the database, allowing users to test their coding skills in real-time. Additionally, users can connect, send friend requests, and challenge their friends to duels!

Table of Contents


Features

  • Random Coding Duels: Face off against other users in real-time coding duels where a random challenge is picked from the database.
  • Friend System: Send and accept friend requests to create a network of coding buddies.
  • Challenge Friends: Once friends, you can directly challenge your friends to a coding duel.
  • Real-Time Interaction: Stay engaged with live duels and notifications for friend requests or challenges.
  • Leaderboard: Compete with others to top the leaderboard by winning duels.

Getting Started

Prerequisites

Before setting up the project, make sure you have the following installed on your machine:

  • Ruby on Rails
  • PostgreSQL

For detailed instructions on installing Rails and PostgreSQL, please refer to the following files:

Installation

  1. Clone the repository:

    git clone https://github.com/giovannilentini/code_legends.git
    cd code_legends
    
  2. Install dependencies:

    Run the following command to install the required gems:

    bundle install
    
  3. Install JavaScript dependencies:

    yarn install
    
  4. Start redis server:

    redis-server
    

Database Setup

  1. PostgreSQL Setup: Follow the instructions in POSTGRES_README.md to configure your PostgreSQL database.

  2. Database Migration:

    After setting up PostgreSQL, run the following command to create and migrate the database:

    rails db:create
    rails db:migrate
    rails db:seed
    
  3. The first Admin must be set from the rails console (User.wher(user_id: your_user_id).update(is_admin: true))


Usage

  1. Start the Rails server:

    Run the following command to start the server:

    rails server
    
  2. Open your browser and go to http://localhost:3000 to start using Code Legends!

About

CodeLegends is a platform for learning programming through interactive challenges. This repository contains the source code and resources for the CodeLegends project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 48.2%
  • HTML 35.2%
  • JavaScript 13.5%
  • CSS 1.6%
  • Gherkin 1.3%
  • Shell 0.2%