diff --git a/README.md b/README.md index 948d0e83..7daf12a6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,81 @@ -## Peetcode -It's an online algorithmic problem solving platform. Built as a joke during the full stack assignments by Harkirat Singh. -No intention of building this into a business. +# Peetcode -If you would like to win an Airpods though, feel free to go through the third part and build the bounty described in the video +This monorepo contains both the client and server components of the Code Runner project. The client folder uses Vite React.js for the frontend, while the server folder uses Node.js for the backend. This project allows you to run C++ code in a containerized manner. -Demo: https://peetcode.com \ No newline at end of file +## Demo + + +https://github.com/jassi-singh/peetcode/assets/54185836/9fd4ea9d-5426-4ca9-b2cc-ab6f34a7760d + + + +## Prerequisites + +Before running this project, please ensure that you have the following dependencies installed: + +- Node.js (v14 or higher) +- Docker +- RabbitMQ server + +## Getting Started + +Follow the steps below to start the project locally: + +1. Pull the `jassi16/code-runner` image from Docker Hub: +- + ``` + docker pull jassi16/code-runner + ``` + + +2. Start the RabbitMQ server. Make sure it is running and accessible. + +3. Start the server: +- Navigate to the `server` directory: + ``` + cd server + ``` +- Install the server dependencies: + ``` + npm install + ``` +- Start the server: + ``` + npm start + ``` + or + ``` + nodemon start + ``` + +4. Run the client: +- Navigate to the `client` directory: + ``` + cd client + ``` +- Install the client dependencies: + ``` + npm install + ``` +- Start the client: + ``` + npm run dev + ``` + +The client will be accessible at `http://localhost:3000`. + +## Usage + +Once the project is up and running, you can use the Code Runner to execute C++ code in a containerized environment. Follow the instructions provided by the client to submit and execute your C++ code. + +## Contributing + +Contributions to this project are welcome. To contribute, please follow these steps: + +1. Fork the repository. +2. Create a new branch for your feature or bug fix. +3. Make your changes and commit them. +4. Push your changes to your forked repository. +5. Submit a pull request describing your changes. + +Please ensure that your code follows the project's coding conventions and includes appropriate tests. diff --git a/client/.gitignore b/client/.gitignore index 3c3629e6..a547bf36 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/client/index.html b/client/index.html index 60ee5964..79c47019 100644 --- a/client/index.html +++ b/client/index.html @@ -5,9 +5,6 @@
| Title | -Difficulty | -Acceptance | -
|---|---|---|
| {prob.title} | - -{prob.difficulty} | -{prob.acceptance} | -
{content.date}
-{content.content}
-{problem.description}
-Input : {problem.exampleIn}
- Output : {problem.exampleOut}
- {problem.description}
++ {selectedSubmission?.output ?? + "Click on a submission to view output"} +
+| Title | +Difficulty | +Acceptance | +
|---|---|---|
| No Problems Available | +