Code Monkey home page Code Monkey logo

website's Introduction

Co-op Soc Website

This repository houses the source code for UNSW Co-op Society's website, hosted at https://coopsoc.com.au and written in Next.js. Visit our website and explore around!

Running the website locally

Before running the website, please ensure that the following is installed:

To run the website on your local machine, do the following:

  1. Clone the repository through git clone https://github.com/coopsoc/coopsoc.com.au.
  2. Go into the repository and run yarn install to install all required packages.
  3. Run yarn dev to launch the website. After executing this command, the website should be available at http://localhost:3000, where any edits made to the website's source code should be immediately reflected on the webpage.

Contributors

The first version of the website was written by the 2020 Co-op Soc IT director, Vincent Chen.

The React rewrite of the website was done by the 2021 IT subcom:

  • Noa Challis
  • Hanyuan Li
  • Rohan Agarwal

This was then ported over to Next.js and improved on by the 2022 IT subcom:

  • Hanyuan Li
  • Stephen Lincon
  • Meghna Sunil

Acknowledgements

This website was originally built using CreativeTim's Argon Design System for React, and heavily modified to work with Next.js.

website's People

Contributors

akswalia23 avatar blackninja1369 avatar hanyuone avatar kksurendran06 avatar lhvy avatar scorpiontornado avatar sofiadebellis avatar stephenlincon avatar theawesomew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

website's Issues

Update events

https://coopsoc.com.au/events

MVP:

  • Get some new photos and replace the ones from like 2020
  • Add 2023 charity events on

Nice-to-have:

  • Expand on description
  • More info on each event
  • One section per event from 2023? Eg name / description / photo carousel
  • Could split into past and upcoming
    • Would need info from socials
    • Already done on the charity page actually, layout is pretty good so we could just steal the React components & add the info
    • I also like the link to the Facebook events, ideally we’d be more proactive in adding that stuff to the upcoming section
    • This seems to require each event to make their own image (see the website) - could either get marketing to make canva images/posters for each event, or perhaps just use a random photo from that event?
    • Would a name of each event next to the photo help, or is the current charity system of click on photo - get modal with name, photo, description enough?
    • Need to add an image carousel to the event modals
  • Merge with charity page?
    • The end user doesn’t really care if the event is for charity or not, this distinction appears to be a remnant from the 2018 CSCS merger
    • Could just move the charity info paragraph to the events page, then merge all the past and upcoming events
    • Some way to distinguish between charity events would be nice, at the very least just have “charity” in each event name. Could also have a colour or banner or logo or something on the modal for charity events
    • Where to put charity list?

Update "Meet the team" page to include 2023 subcom

  • Add 2023 subcom
  • Add 2023 first year reps + pics
  • Make title, url, header link, and page header consistent (currently "Our Team | UNSW Co-op Society", "https://coopsoc.com.au/team", "The Team", and "MEET THE TEAM", respectively
  • Address team.jsx line 40: 'TODO: have this be a subpage of "About"'
  • #24
  • Vertically centre left-hand column of subcom section of /team in each row/portfolio (probably involves centring Subcom.jsx <div className="col-sm-8"> within the parent "row" div)

Create frontend purchase pages

To integrate with our backend Go API. Depends on coopsoc/merch-backend#1

Todo:

Ideally, UX should be something like:

  1. Add to cart
  2. View cart
  3. (Edit cart as needed, changing quantities etc)
  4. Proceed to checkout
  5. Enter payment details etc
  6. Place order -> sends API request to Go backend with a purchase intent
  7. Display success/failure message depending on API response

Create /checkout page

We might steal Stripe's (if we use it) and make it our own, we might build a custom one, we might not even have one and just integrate it with /merch page. Absolutely no clue - it's really subject to how feasible it is to not have a payment microservice.

Create store page

To view merch, prices, colours etc

TODO:

  • Decide how to store product data - potentially a json file with an array of products, each having images, a price, colours etc
  • Create store page, allowing users to browse all products
  • Create page to view an individual product (display a larger photo and details etc), and add to cart

(Optional) - add support for multiple colours of the same item

Instead of having one item for each colour. Was attempted (unsuccessfully) before and changes were reverted.

Possible approaches:

  1. One image for each item, clicking on the image changes to that colour
  2. Radio buttons, one for each colour. Clicking will change the image displayed and changes a "colour" field when adding to cart/purchasing.

Fix exec descriptions not visible

Descriptions are visible in TeamsData.js and rendered in HTML at coopsoc.com.au/team. However, they appear to be rendered behind each person's image, and are thus not visible.

  • Fix ExecCard.jsx so the descriptions are actually show - could be done with a toggle dropdown, a popup, text overlayed onto the image when clicked etc
  • Add descriptions for 2023 execs, directors, and first year reps

Sort out package-lock.json and yarn.lock conflict

Currently the codebase has both package-lock.json and yarn.lock, and running yarn install gives the following error:

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

I believe, we should decide if we are using Yarn or not, and remove the other file.

Migrate payment system to Stripe's low-code solutions

For the 2023 merch rollout, we used Stripe's custom payment flow with it's PaymentIntent API and Stripe’s Web Elements.

This has proven to be a nightmare, so for 2024 we're migrating to Stripe's low-code solutions for the checkout - either a Stripe-hosted page or an embedded form.

My preference would be to use an embedded form to make the experience more visually seamless for users and avoid redirects, but having a fully-functional integration that people trust is the priority (i.e., looks legit & well-tested).

We should also explore ways of making a better storefront - surely there's a solution out there already? Otherwise we could add quality-of-life improvements like #41 and #38 .

  • Decide on Stripe-hosted page or embedded form
  • Implement backend (see https://github.com/coopsoc/merch-backend)
  • Link to existing storefront frontend
  • Explore methods of improving the storefront - #41, #38, cleaner UI/UX etc
  • Ensure stripe invoices contain all product info necessary for suppliers (item, size, colour, quantity)
  • (To be handled elsewhere, perhaps the backend?) Write script to parse exported invoices, collate quantities and present it in a way we can send to suppliers

Potential idea - make website content more outward facing

Trying to sell coop to people who aren't currently scholars (raising awareness for high school students, current uni students etc). Could attract more/better applicants and more sponsors. Limitation is, I doubt many

Perhaps also include more information about what coop is - short description & link to official coop page. Could put on the homepage after "A society for co-ops, by co-ops.", or under the about us page. And/or, include more info/pics about past events under "What we do" in the about us page, or create new page/subheading - would help to increase current coop engagement in events like coop olympics, coop ball etc, as well as attract new scholars/sponsors.

Can we integrate Stripe payment API into the front-end securely?

We'd prefer to avoid having to create and deploy a payment microservice to enable customers to purchase Co-op Society merchandise - primarily because we'd need to pay for the hosting of such a microservice and we'd like to avoid incurring costs wherever possible.

My proposal is we use

This is NOT recommended in serious production systems as storing API keys in .env is a bad idea. If someone ever gets access to our environment variables and has malicious intentions, they can easily make a series of API calls to 'refund' transactions that never occurred; but, we're unlikely to be a target of that kind of attack.

If we don't want to go down that avenue, we'll develop a backend in whatever language you'd like and deploy it here or wherever else y'all think is a good hosting service (maybe AWS)

Update constitution version

Replace old PDF with new one (removes the notion of a "vice president"). Can be found in All Team [Coop] chat.

Create JSX component for displaying store items

Probably just a card element to display items which are available. We have similar 'matrices' of images/content in other places and we can kind of steal the idea from there too (see the team.jsx page and the card we display there?)

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.