Algowars Documentation

website·Indexed 30 days ago

https://docs-algowars.netlify.app

Documentation for Algowars, an online competitive coding platform where users compete in coding challenges. Includes guides on getting started with the client and backend, authentication setup via Auth0, problem domain workflows, and competitive programming difficulty and ELO systems.

Tokens
1.9K
Snippets
9
Records
24
Agent score
75%

What's inside Algowars

  1. Overview of Docusaurus core features

    Docusaurus is a documentation framework designed for quick installation and deployment. It allows developers to focus on content by placing documentation files in the docs directory and provides the ability to extend or customize website layouts using React while maintaining consistent global elements like headers and footers.
  2. Overview of the Algowars platform

    Algowars is an online competitive coding platform designed to gamify coding practice. It allows developers to compete in individual and group-based coding challenges, race to solve problems, and track their progress via a leaderboard.
  3. Interpret problem difficulty levels based on ELO

    Problems are categorized into three difficulty levels based on their assigned ELO rating:

    • Easy: ELO < 1000. Suitable for beginners or warming up; involves straightforward logic or fundamental algorithms.
    • Medium: ELO between 1000 and 1999. Requires a solid understanding of programming concepts and intermediate-level problem-solving techniques.
    • Hard: ELO ≥ 2000. Designed for experienced programmers; demands deep knowledge of algorithms, data structures, and efficient strategies.
  4. Install and set up the Algowars backend

    To get the Algowars backend running, ensure you have Node.js (v16+), a PostgreSQL database, and the NestJS CLI installed. Then, navigate to the backend directory, install dependencies using npm ci, and configure your environment variables to connect to your PostgreSQL database.
    cd backend
    npm ci
  5. Follow the project branch naming convention

    Branches must follow a specific three-part naming structure to maintain consistency and track progress across project management tools. The format consists of a branch type prefix, a ticket identifier (source and number), and a short description.
    <type>/<ticket-source>-<ticket-number>-<short-description>
  6. Understand how ELO ratings are calculated and adjusted

    The ELO rating system adjusts dynamically based on user performance and the relative difficulty of the problems solved:

    1. Solving Problems: Solving a problem with a difficulty higher than the user's current ELO results in a significant rating increase. Solving easier problems provides smaller gains.
    2. Failing Problems: Failing to solve a problem below the user's current ELO results in a rating decrease. The penalty is smaller when failing harder problems.
    3. Competitions: In competitive environments, ELO adjustments are based on relative performance against other participants.
  7. Implement the Create Problem Workflow

    The Create Problem Workflow is a sequential process used to securely create, verify, and test new coding problems. The workflow must be executed in the following order; any failure at any step terminates the process:

    1. Validate User Permissions: Verify the user has a required role (e.g., admin or problem-setter).
    2. Auth Server Validation: Validate user credentials via the authentication server.
    3. Server Account Verification: Confirm the user account is active and approved on the server.
    4. Create Test Environment: Initialize an isolated environment to evaluate test cases without interfering with other system processes.
    5. Run Tests: Execute predefined test cases. If any test fails, the process is halted and the problem must be revised and re-submitted.
    6. Create Problem: Finalize the process and add the problem to the problem pool for use in the competitive coding environment.
  8. Create and organize blog posts in Docusaurus

    Docusaurus blogging features are powered by the @docusaurus/plugin-content-blog plugin. To create blog posts, add Markdown files or folders to the blog directory.

    Post dates are automatically extracted from filenames using the format YYYY-MM-DD-title.md (e.g., 2019-05-30-welcome.md) or from an index.md file within a dated folder (e.g., 2019-05-30-welcome/index.md). Using a folder for each post is recommended for co-locating images with the post content. The blog also supports tags.

  9. Limit blog post preview size in list view

    To control the amount of content displayed for a blog post in the list view, insert the <!-- truncate --> HTML comment within the post content. Content appearing after this comment will be hidden in the list view and only visible on the full post page.
    This is the summary that will appear in the list view.
    
    <!-- truncate -->
    
    This content is hidden in the list view and only appears on the full post page.
  10. Create interactive blog posts using MDX in Docusaurus

    Docusaurus blog posts support MDX (Markdown with JSX), enabling the use of React components directly within blog content to create interactive elements.
    <button onClick={() => alert('button clicked!')}>Click me!</button>