This guide is meant to help potential contributors to
this open source project get started!
All the source code is located in this repo:
Note: Node, npm, and PostgreSQL are required to run algowiz-app locally. More information
in the How to Build AlgoWiz section.
π¦ AlgoWiz
β£ π .github/workflows - Github Actions CI .yml code
β£ π algowiz-app - Frontend source code
β β£ π public - Static files served during frontend build
β β π src - React code
β β£ π components - React Components
β β π tests - Frontend Tests
β£ π api - Backend source code
β β π algorithms - Spring server root directory
β β π src - Spring server source code
β β£ π main - Spring server source code
β β β£ π java/com/example/algorithms - Spring server routes and components
β β β π resources - Spring server resources and properties
β β π test/java/com/example/algorithms - Spring server tests
β£ π documentation - Living documentation, policies and guides
β β π images - Documentation related images
β π status-reports - Weekly team status reports
Note: Node and npm is required to run algowiz-app
postgres
(default superuser) and spring.datasource.password to the one you set up during installation. If you decided to change the default 5432
port during the installation, update the spring.datasource.url accordingly.postgres
superuser.CREATE DATABASE algowiz;
and then GRANT ALL PRIVILEGES ON DATABASE "algowiz" TO postgres;
We are done configuring the database! Let's now build the project using maven.
We will use Maven Wrapper included in the project to build the backend.
./mvnw spring-boot:run
on a bash based shell.chmod a+x mvnw
. Then again run the command in step 2 to build the project.Provide clear instructions for how to run the systemβs test cases. In some cases, the instructions may need to include information such as how to access data sources or how to interact with external systems. You may reference the user documentation (e.g., prerequisites) to avoid duplication.
To run tests
algowiz-app/src/tests
directory. To run the test simply type npm test from algowiz-app/src/
or any of its subdirectorynpm test TestName.js
To run Spring Boot tests
./mvnw test
on a bash shellalgowiz-app/src/tests
directory with the .test.js
extension. (Though tests can be located at any depth under the src top level folder.)algowiz-app/src
or any of its subdirectory and to run the test simply type npm test
AlgoWiz/api/algorithms/src/test/java/com/example/algorithms
@AutoWired
above the initialized variable@Test
above any test methodThe production version of the app is now located in the build folder. The build is minified and the filenames include the hashes.
Your app is ready to be deployed.
To build a release of the software, select the Build Project button at the top right (or under Build in the top left menu).
If you receive an error: By default, the Java language level is set to 5 which is not supported by the current Java version. Update the language level to 6+.
, click Update source level in algorithms
at the end and wait for IntelliJ to make the necessary changes.
When IntelliJ finishes, you should see "AlgorithmsApplication" in the top right Configurations Box.
Then, click the run button to the right of the Configurations box. If everything is set up correctly, the project should now be deployed on the localhost (http://localhost:8080/).
Describe any tasks that are not automated. For example, should a developer update a version number (in code and documentation) prior to invoking the build system? Are there any sanity checks a developer should perform after building a release?
Package React and Spring Boot into a single jar file. Set up server using Digital
Ocean. To move the jar file to the server, have to set up SSH File Transfer Protocol(SFTP) client.
We'll be using FileZilla to do that. Once that is set up, we can deploy our application by running
java -jar your_jar_file.jar
in the command line. To test if the app is running, copy the server's
IP address and append the port number at the end to open the website.