Giter Club home page Giter Club logo

web-app's Introduction

INSAgenda's logo

INSAgenda (web-app)

INSAgenda is a free website allowing students to view their course schedule at INSA Rouen.
Explore our website »

Table of contents

  1. Running
  2. Contributing

Running

You can compile this project and run it on your local machine.

In order to enable you to test the program, we will provide you with a binary of the backend1. This binary is an unoptimized build that is intented to be used for development purposes only. This publicly provided backend is compatible with this public repository.

However, the production backend will refuse all requests sent by clients you compiled yourself. Only we can compile clients that will be compatible with the production backend. When you contribute to this repository and your changes are accepted, we will take care of deploying your code to insagenda.fr.

If you need help at any time feel free to come chat with us on our discord server.
Now that you know how we work, let's get started!

Install the tools

Please install Rust, SQLite3 and Trunk on your machine.

Here are the commands to run on Ubuntu-based systems:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sudo sh # Install Rust
rustup target add wasm32-unknown-unknown # Install wasm target for Rust
sudo apt install sqlite3 # Install SQLite3
cargo install trunk # Install Trunk

Organize data

This repository only contains the web app hosted at /agenda. All other files are stored in our frontend repository, and the backend is closed-source. There is also another public repository containing common data structures used by both the web app and the backend.

In order to setup your development environment, you will thus need to clone three repositories and download a backend binary1.

Here is the required file structure:

insagenda/
├─ frontend/
├─ web-app/
├─ common/
├─ backend/

Commands to run:

mkdir insagenda && cd insagenda
git clone https://github.com/INSAgenda/frontend
git clone https://github.com/INSAgenda/yew-template
git clone https://github.com/INSAgenda/web-app
git clone https://github.com/INSAgenda/common
mkdir backend && cd backend
wget https://insagenda.fr/development/backend.tar.gz # Download the backend binary
tar -xvf backend.tar.gz
wget https://insagenda.fr/development/database # Download an empty database ready to be used by the backend
cd ..

Run the code

# Run the backend in a terminal
./backend/backend

# Build the web-app in another terminal
cd web-app
trunk build --public-url=agenda

The web-app will be served at http://localhost:8088/agenda. All files from the frontend folder will also be served.

You can also run trunk watch instead of trunk build. This will continuously build the web-app as source files are modified.

Tip: Make yourself a script with the code above to increase your productivity.

Contributing

Recommendations

Unwraps are ok on many web_sys methods, but you have to be absolutely sure it will not panic on any modern browser.

Errors are to be handled, but unhandled errors are to be displayed to the user using our custom alert function. We do not currently provide the list of errors that could occur on each endpoint, but that's definitely something we would like have.

License

This project is unlicensed. This means the source code is protected by copyright laws in the most restrictive way.
You can read the code and contribute to it, but you mustn't use it for any other purpose.

Footnotes

  1. The backend binary can be downloaded from our website. This is obviously amd64 Linux-only. You will also need to download an empty database. 2

web-app's People

Contributors

alixanneraud avatar dimitritimoz avatar jujuice079 avatar mubelotix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

web-app's Issues

Save Color pack

Same theme on dark and light theme.
Remove text's colors.

Edit class

If the db doesn't have the correct class the user must be able to change its class.

Click move on wrong day

Quand on charge la page en taille desktop puis quand on la recharge en taille mobile quand on clique sur l'écran, le slider nous envoie dans une position qui ne contient pas de cours. Pour fix en tant qu'user il faut recharger la page après avoir cliqué en taille mobile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.