Giter Site home page Giter Site logo

kimberley-college / prom Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 5.17 MB

Website for Kimberley College Prom 2022

Home Page: https://prom.kim

TypeScript 96.50% JavaScript 3.39% Shell 0.11%
javascript kimberley nextjs prom reactjs supabase typescript wasm web-scale webassembly

prom's People

Contributors

imgbot[bot] avatar john-montgomery2003 avatar jw1912 avatar modlizard avatar nicholasg04 avatar randxmstranger avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

realjammy

prom's Issues

Change login to using Supabase Auth

Using Supabase Auth will vouchsafe us the following advantages over Next-Auth:

  • Can use row level authentication in direct connection to postgres
  • Don't have to write API routes for every thing we want to do with the DB
  • Don't have to call both Supabase AFTER calling Azure for login - Supabase can handle it all

Seems like a no brainer to make this change.

Implement User Panel

After logging in, it should redirect you to your user panel (also accessible via a link on the navbar, maybe by clicking on your name)

This should then follow the design as in Figma

Admin Pages

We need to create protected admin pages for users that have the admin bool in the db set to true.
[ ] User management page (ie checking if users have got a ticket, viewing it etc)
[ ] Stripe Terminal setup
[ ] On the day check-in page (scans QRs)

The best way to do this is by having a pages/admin folder containing _middleware.ts, it which contains code from here

Admin panel UI and functionality

UI should be improved and display state for each user of: not bought ticket, bought ticket or checked in.
A user's ticket should be viewable from this panel.
Search feature to find user, including a filter for state.

Correct inconsistency in home screen sign in buttons.

There is a substantial and detrimental discrepancy within the home screen of the website, one button states 'Sign in with Office' whilst the other states 'Log In', this is disgraceful and must be corrected immediately as it puts the website at substantial risk of cringe.

Next Auth

Implement authentication using nextauthjs/next-auth, using the Azure provider and the Prom Azure AD Application that I've made. I'm going to have to manually import all the allowed emails into supabase, then the signin callback will have to check that their email is in such database before allowing login.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): pin dependencies (@happykit/flags, @supabase/auth-helpers-nextjs, @supabase/auth-helpers-react, formik, react)
  • fix(deps): update dependency @chakra-ui/react to v1.8.9
  • fix(deps): update dependency @sentry/cli to v1.74.5
  • fix(deps): update dependency qrcode to v1.5.1
  • chore(deps): update dependency eslint to v8.24.0
  • chore(deps): update dependency eslint-plugin-jsx-a11y to v6.6.1
  • chore(deps): update dependency eslint-plugin-react to v7.31.8
  • chore(deps): update nextjs monorepo to v12.3.1 (@next/eslint-plugin-next, next)
  • fix(deps): update dependency @sendgrid/mail to v7.7.0
  • fix(deps): update dependency @sentry/nextjs to v7.13.0
  • fix(deps): update dependency @stripe/react-stripe-js to v1.11.0
  • fix(deps): update dependency @stripe/stripe-js to v1.38.1
  • fix(deps): update dependency @stripe/terminal-js to v0.11.0
  • fix(deps): update dependency framer-motion to v6.5.1
  • fix(deps): update dependency micro to v9.4.1
  • fix(deps): update dependency next-pwa to v5.6.0
  • fix(deps): update dependency next-seo to v5.5.0
  • fix(deps): update dependency react-icons to v4.4.0
  • fix(deps): update emotion monorepo to v11.10.4 (@emotion/react, @emotion/styled)
  • fix(deps): update chakra-ui monorepo to v2 (major) (@chakra-ui/icons, @chakra-ui/react, @chakra-ui/system)
  • fix(deps): update dependency @happykit/flags to v3
  • fix(deps): update dependency framer-motion to v7
  • fix(deps): update dependency stripe to v10
  • fix(deps): update dependency uuid to v9
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/lint.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • actions/cache v3
npm
package.json
  • @babel/core 7.17.8
  • @chakra-ui/icons 1.1.7
  • @chakra-ui/react 1.8.8
  • @chakra-ui/system 1.12.1
  • @emotion/react 11.9.0
  • @emotion/styled 11.8.1
  • @happykit/analytics 1.0.1
  • @happykit/flags ^2.0.5-perf.0
  • @sendgrid/mail 7.6.2
  • @sentry/cli 1.74.4
  • @sentry/nextjs 7.5.1
  • @stripe/react-stripe-js 1.7.2
  • @stripe/stripe-js 1.29.0
  • @stripe/terminal-js 0.10.0
  • @supabase/auth-helpers-nextjs ^0.2.2
  • @supabase/auth-helpers-react ^0.2.2
  • @supabase/supabase-js 1.35.3
  • async-jsonwebtoken 1.0.1
  • formik ^2.2.9
  • framer-motion 6.3.3
  • micro 9.3.4
  • micro-cors 0.1.1
  • next 12.1.6
  • next-pwa 5.5.4
  • next-seo 5.4.0
  • qrcode 1.5.0
  • qrcode.react 2.0.0
  • react ^18.2.0
  • react-dom 18.2.0
  • react-icons 4.3.1
  • react-markdown 8.0.3
  • react-qr-reader 3.0.0-beta-1
  • react-scroll-into-view 1.12.0
  • stripe 8.222.0
  • typescript 4.6.3
  • uuid 8.3.2
  • webhook-discord 3.7.8
  • @fast-csv/parse 4.3.6
  • @next/eslint-plugin-next 12.2.0
  • @types/micro 7.3.7
  • @types/micro-cors 0.1.2
  • @types/node 17.0.18
  • @types/qrcode.react 1.0.2
  • @types/react 17.0.44
  • @types/react-dom 17.0.16
  • @typescript-eslint/eslint-plugin 5.18.0
  • @typescript-eslint/parser 5.18.0
  • eslint 8.15.0
  • eslint-config-airbnb 19.0.4
  • eslint-config-airbnb-typescript 17.0.0
  • eslint-plugin-import 2.26.0
  • eslint-plugin-jsx-a11y 6.5.1
  • eslint-plugin-react 7.29.4
  • eslint-plugin-react-hooks 4.4.0

  • Check this box to trigger a request for Renovate to run again on this repository

Refactor TypeScript

Put types in an src/types directory properly for use throughout the application, and implement TS properly in general

Spinners

Severe lack of spinners.... is there a way that we can see if Supabase is loading vs if someone is not logged in? This would avoid it showing that someone isn't logged in when it is in fact just loading?

Insert logo into QR code

If you're really having to open this issue's description then you need to reconsider your life choices and gain a little IQ.

Analytics

Maybe using @happykit/analytics again?

Redirect URL

Fix redirects from Supabase and Stripe to use an env var like NEXT_PUBLIC_BASE_URL or something

Ticket Handling/Admin Panel

  • Decide on final ticket schema
  • Are we going to store JWTs or just the ticket ID? Storing JWTs would be easier because then we can just grab that directly without having to sign them on server side?
  • Add to Google Pay
  • Decide if we can do Apple Pay
  • Design admin panels
  • QR code scanner (also editing db to say they've checked in - can do this using RLS)
  • Stripe Terminal page
  • User management page

Need to make sure these routes are protected. Couple of ways to go about this, perhaps using Next.js middleware might be a nice one.

Ukraine support banner

Colours can be yellow/blue or black/red as found to be fit for the general UI (if you chose black/red you are stupid).

Lack of discrete axolotl references

There is an atrocious lack of hidden, inconspicuous axolotl references throughout the website, this must be corrected immediately for the safety and wellbeing of the human population.

Proper Session Storage

In addition to basic auth stuff, we need to make other information available:

  • Whether a user is an admin should be in session storage
  • Ticket data should probably be loaded using SWR on required pages

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.