Markliniubility / Codely

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About the project

Inspiration

Have you ever got EXHAUSTED from LeetCode?
Have you ever felt extremely BORED when preparing for interviews?
Have you ever desired to have a companion so you won’t be tortured by coding ALONE?

According to our surveys sent to 45 coders, 86% of them find solving LeetCode problems boring when they are coding alone, and more than half of the coders have strongly wished to have a companion while coding. We ourselves, who are also coders tired of solo coding, especially during quarantine where everythings has to be remote, want to make a difference. Therefore, we created codely - a multiplayer website for coders to compete with others and learn while having fun.

What it does

In codely, users can compete with online matched coders. Coding problems and opponents are matched based on users’ rankings (bronze -> silver -> gold -> platinum -> diamond -> master). Or, users can sent invitation links to their friends to compete together. While competing, users could see the progress made by their opponent and interact with the other side via emojis & chat. After the problem is solved, we calculate the score of solution by runtime (50%), used time (30%), and memory distributuion (20%). The person with the higher score wins the match and climb the rank.

How we built it

Firstly, we brainstormed which React components are needed for codely.us, such as dashboard, compete page and result page. Then we split the work and assigned them to our teammates. Each of us was in charge of specific react components, and more experienced members took over the layout and logistics work. After each component is completed, the member requests pull request on our github repo, and the branch is merged after code review by at least 2 other teammates. Finally, we use Github page and Cloudflare to deploy our website.

Challenges we ran into

When writting inline styles for components, we found it unorganized and hard to manage as the app scales up. By searching online, we found useStyles, a custom React hook by Material UI, which helps stores css as variables and allows us to reuse them accross various components. We taught teammates to learn this hook and reconstructed our components by switching from inline styles to useStyles.

Accomplishments that we’re proud of

Since we all think the light theme in leetcode is devastating, we want to implement dark mode in Codely. However, we found trying to change to background color of every component not efficient, we wanted to find a global solution for switching to dark mode. By searching online, we came across material ui, which provides mui theme for global dark mode. By reconstructing our app layout and inserting theme provider, we have a coding website where dark mode saves coders' eyes.

What we learned

Due to the time constraint, we have to identify the problems and solve them quickly for each single step during the development, which is a desirable ability to have during our later coding career. Further, through this opportunity, our skills of collaboration with other coders significantly improved. We also understood the whole process of developing something, from having the ideas in mind to actually put them in action and make them work.

What’s next for Codely

We are planning to add backend to fully implement our features using node.js. We will implement user registration, LeetCode scraper, multi-language complier, etc.


Getting Started with Create React App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

About


Languages

Language:SCSS 54.1%Language:JavaScript 35.0%Language:HTML 10.9%