Skip to content

Chipsetjunkie/LeanCode

Repository files navigation


LeanCode

A client side code execution sandbox mimicking some of leetcode's functionality.

Demo

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contribution
  5. License
  6. Contact

About The Project

This is a side project focused on creating a code sandbox that allows code execution on the client-side. The main goal was to explore the idea of building a minimalistic sandbox similar to platforms like LeetCode.

The project explores both firebase (checkout firebase branch) and localstorage as db sources. The main branch uses localstorage as db and authentication is maintained across sessions.

(back to top)

Built With

Next Firebase Tailwind Recoil Codemirror

(back to top)

Getting Started

This is a standard Nextjs project. Do install the necessary packages and get hacking. Do note that, the authentication flow in the main branch is a simulated one, meaning browser storage is leveraged to handle these flows. If you intend to have a backend service, do checkout out the firebase branch. Basic implementation is already in place with limited sandbox functionality. Initially, started with firebase but later decided to disable it due to billing paranoia 😅

Installation

  • To get started do install the pacakges using the following command

    npm install 
  • To run in dev mode

    npm run dev 

NOTE: You will have to setup envs by yourself, do refer env type declaration(env.d.ts) for naming conventions.

Roadmap

  • Move code execution to workers
  • Truncate execution results output
  • Handle non-primitive inputs
  • Handle timeout and rogue loops

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/Chipsetjunkie/LeanCode

(back to top)

About

A minimal implementation of leet code website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published