Giter Club home page Giter Club logo

metis's Introduction

Metis

Requirements

  • Node (N-API version 3, so just get the current latest version)
  • npm
  • A handful of braincells

Development

Installing dependencies

It is recommended to install the dependencies for both the frontend and the backend, as both are required to host a local development server.

In order to install the backend dependencies call npm i in the repo root

In order to install the frontend dependencies call npm i react-frontend

Building the frontend

If you're making changes to the frontend you'll have to call this everytime you make a change in order to get them to show when the page is visited

This has to be called at least once even if you're working on the backend as it is required in order to run a local dev server

In react-frontend call npm run build

Hosting a local development server

A basic local development server can be run with

node app.js

This will run a local server on your system, accessible at localhost:3000

nodemon is recommended if you're going to be making backend changes as this autorefreshes scripts which are changed whilst it is running

This can be installed globally with:

npm install -g nodemon

And then run with

nodemon app.js

Pushing a production build

This is for git bash

git checkout prod puts you in the production branch

git merge main merges the main branch into the current (prod)

git push pushes it to github

metis's People

Contributors

keartland avatar eddy-dunton avatar impathrion avatar harrymcgill avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

metis's Issues

Strange behaviour from the upload window

Describe the bug
Mulitple different issues, which may stem from the same bug:

  • When a file is chosen the dialog reopens (this repeats until the dialog is closed)
  • The cancel upload button doesn't to work, if you press it and then press the button to get the select file dialog open the canceled upload reappears

To Reproduce
Steps to reproduce the behavior:

  1. Go to upload
  2. Click on select file
  3. Select file
  4. Dialog reopens
  5. Cancel upload
  6. Click on select file
  7. Cancelled upload reappers

Error Messages
No errors, however it seems the FileList is never being cleared

Screenshots
Can provide if necessary

Modules do not appear in the publish dropdown until page is refreshed

Describe the bug
Modules do not appear in the publish dropdown until page is refreshed

To Reproduce
Steps to reproduce the behavior:

  1. Go to profile
  2. Join Unit
  3. Press Publish
  4. Newly joined unit does not appear from unit dropdown until page is refreshed

Error Messages
None

Additional context
None

Incorrect message when accessing non-existent users

labels: bug
assignees: Keartland


Describe the bug
When signed in and trying to access https://metis.ga/profile/HarryM you receive the "need to be signed in to view HarryM" (screen 1) and it behaves as if you were signed out (even when you go to the homepage (screen 2). However, when you go to your userpage without signing in again the session is still active and you are logged in (screen 3) and when you navigate to the homepage from there it behaves normally (screen 4)

To Reproduce
Steps to reproduce the behavior:

  1. Sign in
  2. Enter https://metis.ga/profile/HarryM in the browser [for non-existent users or for Harry it works just fine]
  3. Click on the homepage button
  4. Enter https://metis.ga/profile/[your_username] in the browser
  5. Click on the homepage button

Error Messages
No errors

Screenshots
Screen 1
obraz

Screen 2
obraz

Screen 3
obraz

Screen 4
obraz

Additional context
Add any other context about the problem here.

API Endpoints

We should probably crease separate issues once these are started

  • createUser?email=[EMAIL]&username=[username]&passwordHash=[hashedpassword(hashed on front end)] returns a cookie or error
  • isUser?email=[EMAIL]&passwordHash=[hashedpassword(hashed on front end)] returns a cookie or error
  • getUserInfo?username=[username] returns info about the user for profile page
  • getPreviewUserInfo?username=[username] returns info about the user for the navbar
  • getUserBrowsingInfo?username=[username]&cookie=[cookie] returns recenely viewed your posts and my courses, should probably change name of this
  • createNote?file=[file not enterly sure the correct way to do this but yk]&title=[title]&module=[module]&tags=[tags]&desciprition=[desciprition] returns a response like worked or error
  • getNotes?search=[search] returns notes that match search and info about note
  • getNote?id=[id] returns info about the note using that id
  • setModerator?bool=[boolean]&auth=[cookie] returns whether it worked or not

Welcome page sign in / create account do nothing

Describe the bug
As title
When signing in it appears it doesn't send the username / email
And the create account button seems to be linked up to nothing

To Reproduce
Steps to reproduce the behavior:

  1. Go to metis.ga
  2. Enter valid credientials (in either login or create account)
  3. Press button

Error Messages
Login: isUser returns 400: No username or email field
Create Account: No error message appears, even after pressing the button multiple times (seems no request is sent)

Screenshots
image

Additional context
Add any other context about the problem here.

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.