Coder Social home page Coder Social logo

ebb's Introduction

ebb

UWaterloo Course Search Tool, CS 348 Project

Workspace

ebb/
├── models
├── openapi
├── production
├── sample
├── src/
│   ├── backend
│   ├── components
│   └── templates
└── stores

models are shared across backend, frontend components and templates, and also used for queries in sample and production.

stores defines traits implemented by sample and production and dynamically dispatched by backend.

openapi consists of generated bindings for the v3 Waterloo OpenData API.

Dev Requirements

  1. Rust
  2. npm
  3. Docker
  4. perseus-cli
    cargo install perseus-cli
  5. sqlx-cli
    cargo install sqlx-cli --no-default-features --features native-tls,postgres

Dev Setup

  1. Clone the repository.

    git clone [email protected]:GauravTalreja/ebb.git
    cd ebb
  2. Install npm dependencies. This is required each time package-lock.json changes. It is unlikely that it will change in the future as we are only using npm for DaisyUI.

    npm install
  3. Copy env/sample.env or env/prod.env to the project root and rename it to .env. Add your API_KEY.

  4. Run local Postgres containers for the sample and prod databases.

    docker compose up
    
  5. Run ebb migrations. This is necessary because all sqlx macro queries are checked at compile time, and that requires access to a database with the correct schema. It is possible to build without this by removing DATABASE_URL from the .env file, in which case sqlx relies on the sqlx-data.json file. However, you probably want to connect to an actual database during development to test your changes.

    cd sample
    sqlx migrate run
    
    cd production
    sqlx migrate run
    

Development

Run a local Postgres container.

docker compose up

Check your changes as you make them.

perseus check -w

Build and view your changes in a browser as you make them.

perseus serve -w

If you want proper syntax highlighting and IDE features for anything annoted with the #[cfg(client)] macro, change "engine" to "client" in .cargo/config.toml. You'll need to change it back if you want it for engine code.

Read about other helpful commands in the Perseus documentation.

Deployment

Connect to the vm.

(if you're on campus/using the vpn)

ssh fedora@IP_ADDRESS

(otherwise use any computer connected to the campus network as a jump relay, the student cs servers are used here)

ssh -J [email protected] fedora@IP_ADDRESS

Run the deploy script

cd ebb
./deploy.sh

ebb's People

Contributors

gauravtalreja avatar patelprojects avatar sallyhong2347 avatar saumyakhati avatar

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.