Atlas is an open-source platform for hosting CTF competitions, utilizing dynamic Docker orchestration to manage challenge environments. It offers an intuitive frontend, customizable admin panel, and a robust backend for seamless deployment and container management, ensuring a scalable and flexible CTF event experience.
- Clone the repository:
git clone https://github.com/WebClub-NITK/atlas.git
- Navigate to the frontend directory:
cd frontend
- Install the dependencies:
pnpm install
- Run the development server:
pnpm run dev
- Navigate to the backend directory:
cd backend
- Copy the example
.env.example
to a new.env
file. - Fill in the required environment variables.
Example .env
file:
DB_NAME=your_database_name
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_HOST=your_database_host
DB_PORT=your_database_port
- Create and activate a virtual environment:
python -m venv venv source venv/bin/activate
- Install the dependencies:
pip install -r requirements.txt
- Run the server:
python manage.py runserver
- Use clear and concise comments to explain the purpose of complex code blocks. For example,
# Calculate the total price including tax
. - Avoid redundant comments that state the obvious, such as
# Increment i by 1
. - Use docstrings for functions and classes to describe their purpose, parameters, and return values. Example:
def fetch_user_data(user_id): """ Fetches user data from the API. Args: user_id (str): The ID of the user. Returns: dict: The user data. """
- Use 4 spaces for indentation.
- Prefer
import
statements at the top of the file. - Use meaningful and descriptive names for variables and functions, such as
calculate_total_price
. - Ensure consistent use of single quotes for strings, like
'Hello, World!'
. - Place opening braces on the same line as the statement, e.g.,
if True:
.
- Use snake_case for variable and function names, e.g.,
user_name
. - Use PascalCase for class names, e.g.,
UserProfile
. - Use UPPER_SNAKE_CASE for constants, e.g.,
API_URL
. - Choose meaningful and descriptive names for variables and functions, such as
calculate_total_price
.
- Write clear and concise commit messages.
- Use the present tense, e.g.,
Add feature
notAdded feature
. - Capitalize the first letter of the commit message.
- Use imperative mood, e.g.,
Fix bug
notFixed bug
. - Include a brief description of the changes made.
- Reference relevant issue numbers in the commit message.
- Use prefixes like
fix:
,feat:
,frontend:
,backend:
,misc:
to categorize commits.
- Use feature branches for new features and bug fixes. For example,
feature/add-user-authentication
. - Keep the
main
branch in a deployable state. - Regularly pull changes from the
main
branch to keep your branch up to date. - Perform code reviews and seek feedback from team members.