Skip to content

Commit ae7f22f

Browse files
authored
Merge branch 'webdevcody:main' into webdevcody#648-invalid-race-post-request
2 parents 5406fef + 1f8ec08 commit ae7f22f

File tree

90 files changed

+1619
-1142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1619
-1142
lines changed

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44

55
# MacOS generated files
66
**/.DS_Store
7+
8+
# VS Code generated files
9+
**/.vscode/*

Diff for: CONTRIBUTING.md

+36-16
Original file line numberDiff line numberDiff line change
@@ -28,61 +28,77 @@ You will need to [install docker](https://www.docker.com/get-started/) on your l
2828

2929
If you do not have docker, go here to download and install: <https://www.docker.com/get-started/>
3030

31+
If you see error starting db on M1 mac, you may need to update your docker config file at `~/.docker/config.json`
32+
Your file should look like something like this:
33+
34+
```
35+
{
36+
"auths": {},
37+
"currentContext": "desktop-linux"
38+
}
39+
```
40+
3141
If you are getting WSL error when you launch your desktop docker application, go here and follow these steps for windows: <https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package>.
3242

3343
## Installation
3444

3545
To get started with Code Racer locally, follow these steps
3646

37-
1. Fork the repo
47+
1. Make sure you have installed Docker locally (See above Prerequisites)
3848

39-
2. Clone your fork
49+
2. Fork the repo
50+
51+
3. Clone your fork
4052

4153
```sh
4254
git clone https://github.com/<YOUR_GITHUB_ACCOUNT_NAME>/code-racer.git
4355
```
4456

45-
3. Navigate to the project directory
57+
4. Navigate to the project directory
4658

4759
```sh
4860
cd code-racer
4961
```
5062

51-
4. Create a .env file inside the project's packages/app directory.
63+
5. Create a .env file inside the project's packages/app directory.
5264

53-
5. Copy and paste variables from `packages/app/.env.example` into `packages/app/.env`
65+
6. Copy and paste variables from `packages/app/.env.example` into `packages/app/.env`
5466

55-
6. Install NPM packages
67+
7. Install NPM packages
5668

5769
```sh
5870
npm i
5971
```
6072

61-
7. Start the database
73+
8. Start the database
6274

6375
```sh
6476
npm run dev:db
6577
```
6678

67-
8. Start the app dev server
79+
9. Start the app dev server
6880

6981
```sh
7082
npm run dev:app
7183
```
7284

73-
9. Start the web socket server
85+
10. Start the web socket server
7486

75-
```sh
76-
npm run dev:wss
77-
```
87+
```sh
88+
npm run dev:wss
89+
```
7890

7991
Open your browser and visit <http://localhost:3000> to see the application running.
8092

8193
## Working on New Features
8294

83-
If you're new to github and working with open source repositories, I made a video a while back which walks you through the process:
95+
If you're new to Github and working with open source repositories, I made a video a while back which walks you through the process:
8496
[![How to make a pull request on an open source project](https://img.youtube.com/vi/8A4TsoXJOs8/0.jpg)](https://youtu.be/8A4TsoXJOs8)
8597

98+
There is also a new video explaining how you can contribute to this project:
99+
<br/>
100+
[How to contribute to open source projects (our community project walkthrough)](https://www.youtube.com/watch?v=dLRA1lffWBw)
101+
86102
If you want to work on a new feature, follow these steps.
87103

88104
1. Fork the repo
@@ -105,26 +121,30 @@ git checkout main
105121
git pull upstream main
106122
```
107123

108-
## Before Submitting Pull Request
124+
## Before Submitting a Pull Request
125+
109126
Before submitting a **Pull Request**, you should
127+
110128
1. Check your code safety with Linter and TypeScript, and make sure your code can build successfully.
111129

112130
```sh
113131
npm run pr:precheck
114132
```
115133

116-
2. (Optional) Do an E2E test to ensure application function properly
134+
2. (Optional) Do an E2E test to ensure application functions properly
117135

118136
```
119137
npm run e2e -w @code-racer/app
120138
```
139+
121140
## Code of Conduct
122141

123142
### Our Pledge
124143

125144
In the interest of fostering an open and welcoming environment, we as
126145
contributors and maintainers pledge to making participation in our project and
127-
our community a friendly experience for everyone, regardless of any experience to give everyone an opportunity to contribute in this project.
146+
our community a friendly experience for everyone, regardless of any experience
147+
to give everyone an opportunity to contribute in this project.
128148

129149
### Our Responsibilities
130150

Diff for: packages/app/LICENSE renamed to LICENSE

File renamed without changes.

Diff for: README.md

+62-26
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,102 @@
11
<div align="center" >
2-
<img src="./packages/app/public/static/logo.png" width="60" alt="">
2+
<img src="./packages/app/public/static/logo.png" width="60" alt="code-racer-logo">
33
<br/>
44
<h1>Code Racer</h1>
55
</div>
66

7-
<br/>
8-
97
<div align="center">
10-
Welcome to Code Racer, a community project built with <a href="https://nextjs.org/">Next.js</a>, <a href="https://tailwindcss.com">Tailwind CSS</a> and <a href="https://www.typescriptlang.org">TypeScript</a>.
11-
Code Racer is a multiplayer coding game where developers can compete against each other to solve programming challenges in real-time. Sharpen your coding skills, challenge your peers, and have fun while racing against the clock!
8+
Welcome to Code Racer, a community project built with <a href="https://nextjs.org/">Next.js</a>, <a href="https://tailwindcss.com">Tailwind CSS</a>, and <a href="https://www.typescriptlang.org">TypeScript</a>.
9+
Code Racer is a multiplayer coding game where developers can compete against each other to solve programming challenges in real-time. Sharpen your coding skills, challenge your peers, and have fun while racing against the clock!
1210
</div>
1311

14-
## Features
12+
<div align="center">
13+
<!-- TO ADD more Badges use -> https://shields.io/ -->
14+
15+
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/webdevcody/code-racer">
16+
<img alt="Repo License" src="https://img.shields.io/github/license/webdevcody/code-racer">
17+
<img alt="Website Status" src="https://img.shields.io/website?url=https%3A%2F%2Fcode-racer-eight.vercel.app">
18+
19+
</div>
20+
21+
22+
## Table of Contents
23+
24+
- [:rocket: Features](#features)
25+
- [:hammer_and_wrench: Technologies Used](#technologies-used)
26+
- [:handshake: Contribution](#contribution)
27+
- [:lock: License](#license)
28+
- [🙏🏻 Acknowledgements](#acknowledgements)
29+
- [:envelope: Contact](#contact)
30+
- [:clapper: Related Youtube Videos & Progress](#related-youtube-videos-progress)
31+
32+
<a id="features"></a>
33+
34+
## Features &colon;rocket&colon;
1535

1636
- Code snippet games
1737
- [Multiplayer races](./packages/wss/README.md)
1838

19-
## Technologies Used
39+
<a id="technologies-used"></a>
40+
41+
## Technologies Used &colon;hammer_and_wrench&colon;
2042

21-
- [Next.js](https://nextjs.org) : A React framework for building server-side rendered and statically generated applications.
22-
- [NextAuth](https://next-auth.js.org) : For user authentication.
23-
- [Prisma](https://www.prisma.io) : Next-generation ORM, it provides a clean and type-safe API for submitting database queries
24-
- [Tailwind CSS](https://tailwindcss.com) : A utility-first CSS framework for rapid UI development.
25-
- [TypeScript](https://www.typescriptlang.org): A typed superset of JavaScript that provides enhanced tooling and developer productivity.
43+
- [Next.js](https://nextjs.org): A React framework for building server-side rendered and statically generated applications.
44+
- [NextAuth](https://next-auth.js.org):For user authentication.
45+
- [Prisma](https://www.prisma.io):Next-generation ORM, it provides a clean and type-safe API for submitting database queries.
46+
- [Tailwind CSS](https://tailwindcss.com):A utility-first CSS framework for rapid UI development.
47+
- [TypeScript](https://www.typescriptlang.org):A typed superset of JavaScript that provides enhanced tooling and developer productivity.
2648

27-
## Contribution
49+
<a id="contribution"></a>
2850

29-
We welcome contributions from the community! If you'd like to contribute to Code Racer, please follow refer to [CONTRIBUTING.md](./CONTRIBUTING.md), but we have these base guidelines:
51+
## Contribution &colon;handshake&colon;
3052

31-
- Fork the repository.
32-
- Create a new branch for your feature or bug fix.
33-
- Make your changes and test thoroughly.
34-
- Commit your changes with clear commit messages.
35-
- Push your branch to your forked repository.
36-
- Submit a pull request detailing your changes.
53+
We welcome contributions from the community! If you'd like to contribute to Code Racer, please refer to [CONTRIBUTING.md](./CONTRIBUTING.md). We have these base guidelines:
54+
55+
- Fork the repository
56+
- Create a new branch for your feature or bug fix
57+
- Make your changes and test thoroughly
58+
- Commit your changes with clear commit messages
59+
- Push your branch to your forked repository
60+
- Submit a pull request detailing your changes
3761

3862
Please ensure that your code adheres to the project's coding standards and conventions.
3963

40-
## License
64+
## License &colon;lock&colon;
65+
66+
<a id="license"></a>
4167

4268
The Code Racer project is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.
4369

44-
## Acknowledgements
70+
<a id="acknowledgements"></a>
71+
72+
## Acknowledgements 🙏🏻
4573

4674
Code Racer wouldn't be possible without the valuable contributions and support from the open-source community. We would like to express our gratitude to all the contributors and acknowledge the following libraries and resources used in this project.
4775

4876
A big thank you to all the developers who have helped shape Code Racer into what it is today!
4977

50-
## Contact
78+
<a id="contact"></a>
79+
80+
## Contact &colon;envelope&colon;
5181

52-
If you have any questions, suggestions, or feedback regarding Code Racer, please feel free to reach out to us at in the WebDevCody [discord](https://discord.gg/4kGbBaa) server
82+
If you have any questions, suggestions, or feedback regarding Code Racer, please feel free to reach out to us at in the WebDevCody [discord](https://discord.gg/4kGbBaa) server.
5383

5484
Happy coding and enjoy the race!
5585

56-
## Related Youtube Videos & Progress
86+
<a id="related-youtube-videos-progress"></a>
87+
88+
## Related Youtube Videos & Progress &colon;clapper&colon;
5789

5890
1. [Community Project Announcement Video](https://www.youtube.com/watch?v=-n6tV3RPjGc)
5991
2. [First Q&A Livestream and Community Project Live Coding Session](https://www.youtube.com/watch?v=BQXXBsHXfak)
92+
3. [How to contribute to open source projects (our community project walkthrough)](https://www.youtube.com/watch?v=dLRA1lffWBw)
93+
4. [You need to write tests when this starts to happen](https://www.youtube.com/watch?v=PzrhclEQp-M)
94+
5. [CodeRacer had a major security issue](https://www.youtube.com/watch?v=FigpqBGqwK4)
95+
6. [Stop calling prisma inside server components](https://www.youtube.com/watch?v=sLIoCfKK5SA)
6096

6197
<details>
6298
<summary>
63-
<h2>How To(s) - A newbie section</h2>
99+
<h2>How To(s) - A newbie section</h2>
64100
</summary>
65101

66102
### Check the logs of Post

0 commit comments

Comments
 (0)