This repository contains the frontend code for the C0D CTF platform, utilizing the T3 stack with Next.js and React. This README will guide you through setting up and using the frontend.
Before you begin, ensure you have met the following requirements:
- Node.js 18.x or higher
- pnpm (for package management)
-
Clone the repository (or a fork of the repository):
git clone https://github.com/lugvitc/c0d-frontend.git cd c0d-frontend
-
Install project dependencies:
# (optional) corepack enable pnpm # install dependencies pnpm install
Storybook is used for developing and testing UI components in isolation. To get started with Storybook:
-
Start Storybook:
pnpm storybook
-
View Storybook:
Open your browser and navigate to http://localhost:6006 to view the Storybook interface.
-
Writing Stories:
Look at
src/components/text.tsx
andsrc/stories/text.stories.tsx
to get an idea of how to write stories for your own components.
-
Start the development server:
pnpm dev
-
Open your browser and navigate to http://localhost:3000 to view the application.
To contribute to the C0D Frontend, please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature
) - To view/test changes that you're making, utilize storybook (look at usage -> writing stories).
- Make sure to run
pnpm format
&pnpm lint
before commiting changes. - Commit your changes (
git commit -m 'Add your feature'
). Make sure to use conventional commit messages. - Push to the branch (
git push origin feature/your-feature
) - Open a Pull Request
Happy coding and we look forward to your contributions!