Giter VIP home page Giter VIP logo

class-schedule-editor's Introduction

Class Schedule Editor

This project uses React for frontend, NodeJS and ExpressJS for backend, and PostgreSQL for the database.

Getting Started

  1. Clone the repository
  2. Navigate to the project folder.
  3. Initialize and install the necessary modules.
npm install
  1. Navigate to the client directory and initialize and install the necessary modules (for frontend).
cd client && npm install
  1. Run cd .. to go back to the root project folder.

  2. Create a .env file following the format:

DATABASE_URL=

Usage

To run the application, run npm run dev.

To run the frontend only, run npm run dev:client or npm start --prefix ./client.

To run the backend only, run npm run dev:server. Alternatively, you can use the following commands:

  • To see live changes using nodemon, run nodemon server.js to see changes live
  • To run the current version only (restart required for any changes), run node server.js

Content

  • client - contains files for the frontend
  • src - contains files for the backend
    • controllers - contains files which defines callback functions for client requests.
    • models - contains files for database modeling and access.
    • public - contains static assets such as css, js, and image files.
    • routes - contains files which describes the response of the server for each HTTP method request to a specific path in the server.
    • app.js - The main entry point of the web application.

class-schedule-editor's People

Contributors

nicapos avatar cheafernandez avatar justjelooo avatar jaekanna avatar

Watchers

 avatar

class-schedule-editor's Issues

Missing redirect after visiting main page

Expected Behavior

After visiting the main page (/), the user should be redirected to either /login (if not logged in) or /app (if already logged in).

Actual Behavior

Persistent loading state for the main page. No redirects

Steps to Reproduce the Problem

  1. Visit https://localhost:3000/
  2. Wait lol

Specifications

  • Browser: any
  • Platform: any

No Auto Logout

Expected Behavior

If user goes back and forth the login page and the app, they aren't able to go back to their account despite not logging out.

Actual Behavior

If user goes back to the login page by inputting "https://localhost:3000/login" as the url while still logged in, if you return back to the previous page "https://localhost:3000/login/app" it goes back to the account of the previous user without needing login credentials.

Steps to Reproduce the Problem

  1. Login as any user
  2. Stop server
  3. Restart server
  4. Input "https://localhost:3000/login/app" as the url

Specifications

  • Browser: Any
  • Platform: Any

Image upload preview doesn't reset after registration

Expected Behavior

Previewed image should be the default placeholder image, since the file upload input is empty.

Actual Behavior

Previewed image shows the uploaded avatar from the last registration.

Screenshot 2024-03-19 at 11 43 16 AM

Steps to Reproduce the Problem

  1. Successfully register for a new account
  2. Go back to registration page after being redirected to the login page

Specifications

  • Browser: any
  • Platform: any

Error in registration form submit

Expected Behavior

Clicking on the submit button multiple times should show only one alert (successful or failed registration).

Actual Behavior

Clicking on the submit button multiple times shows multiple alerts. For example, for a valid registration form, clicking the submit button 3 times results in 1 "successful" alert and 2 "failed" alerts.

Steps to Reproduce the Problem

  1. Fill up the registration form
  2. Click "Create Account" multiple times

Possible Fix

The submit button ("Create Account") should be disabled while waiting for a response from the server. Try to use isLoading state with the disabled attribute for <button>.

Specifications

  • Browser: any
  • Platform: any

No form validation for Add Class

Expected Behavior

Form should be validated before being submitted. (A form is being submitted when the toast pops up on the lower right corner)

Actual Behavior

A form for "Add Class" can be submitted with missing fields.

Steps to Reproduce the Problem

  1. Log-in
  2. Visit https://localhost:3000/app
  3. Click "Add Class"
  4. Click on any Day
  5. Submit form

Specifications

  • Browser: any
  • Platform: any

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.