The Source Academy is a gamified platform designed to teach students coding while having fun! This repository in particular houses the source code for the frontend written in ReactJS with Redux.
- Playground to write and test programs
- Built-in Debugger and Visualiser to interact with your programs
- Missions/Quests/Contests to solve challenging problems while learning about programming fundamentals
- Sessions for collaborative programming
- Grading System to test your programs and marking
- Install a stable version of NodeJS (tested: Node 10.15.0).
- Clone this repository and navigate to it using "cd" in your command line or shell tool.
- Run
npm install
to install dependencies. (Runningaudit fix
may prevent server from starting) - Copy the
.env.example
file as.env
and set the necessary variables (refer below for more information) - Run
npm start
to start the server atlocalhost:8075
.
The project requires some environment variables to be set to work properly. In the .env
file a few things need to be set-up:
- REACT_APP_LUMINUS_CLIENT_ID : This is needed for the login to work at the moment.*
- REACT_APP_USE_BACKEND: Set to false if not running together with the backend. Take note that CORs has to be handled if running with the backend
- REACT_APP_CHATKIT_INSTANCE_LOCATOR: Set this up if running with chatkit. Its documentation can be found here.
*If you require access to Luminus keys please email Prof Henz at [email protected] to request for a with the email subject heading "Request for Luminus API Keys".
Before pushing to Github, ensure that your code is formatted and your tests are passing. These two commands should help with that:
npm run format
: formats your codenpm run test
: runs the tests and prints the output
See js-slang README for instructions how to run your own js-slang in the cadet-frontend.
The development of Source Academy 2021 is on-going. Use the branch sa_2021
in this repository for your pull requests. The tip of branch sa_2021
in cadet-frontend
is automatically deployed as https://source-academy.github.io/.
Refer to our issue tracker and contribute to any open issues you are able to spot there. If you have any new issues, please do post there as well. We welcome any form of contribution and are open to any new ideas you may have for the project!
To start contributing, create a fork from our repo and send a PR. Refer to this article for more information.
actions
contains action creators, one file per reducer, combined in index.assets
contains static assets.components
contains all react components.containers
contains HOC that inject react components with Redux state.mocks
contains mock data structures for testingreducers
contains all Redux reducers and their state, combined in index.sagas
contains all Redux sagas, combined in index.slang
contains the source interpreter.styles
contains all SCSS styles.utils
contains utility modules.
We reference this guide.
For more info on specific frontend projects, please consult our wiki.