Skip to content

Meaningful-Code/meaningfulcode-frontend

Repository files navigation

Meaningfulcode Logo

MeaningfulCode / frontend

This repository holds the frontend code of meaningfulcode.org.

The full list of projects can be seen at https://github.com/Meaningful-Code/meaningful-projects.

The goal of this website is to promote meaningful and open-source projects looking for new contributors, willing to make a difference. Projects are regrouped in different categories: Health, Education, Environment, Society, and Humanitarian.

Contributing & Supporting

Contributors are very welcome, to help us you can:

But you can also...

Build

Stack

The project uses:

  • Frontend: Next.js with App router, React, and Material UI with Typescript.
  • Backend (available separately): Node & Express (Typescript), AWS Lambda & DynamoDB.
  • Hosting: the full solution currently runs on Vercel.

The rest of the instructions on this page focus on the frontend.

Setup

The following steps guide you to setup your environment:

  1. Install Node 20
  2. Install yarn
  3. Clone this repository, and run yarn install

Run locally without the backend

  1. Configure the frontend to use local stub data by creating a .env.local file containing

    REACT_APP_FORCE_API=stub
    
  2. Run the development server with yarn dev. You should see:

    yarn run v1.22.19
    $ next dev
    ▲ Next.js 14.0.4
    - Local:        http://localhost:3000
    - Environments: .env.local
    
    ✓ Ready in 1059ms
    

Run locally with the backend

Note that the backend (src/app/api) is not available publicly for security reasons.

  1. Checkout the api submodule: git submodule update --init

  2. Set the appropriate environment variables in .env.local and add

    MEANINGFUL_DEV=1
    
  3. Run with yarn dev.

Environment variables

  • REACT_APP_FORCE_API environment variable can be set to

    • stub,
    • local, API expected at http://localhost:3001,
    • or prod.
  • MEANINGFUL_DEV forces using localhost for API endpoints

Production build

To test a production build, simply run:

  1. yarn build
  2. npm install -g serve
  3. serve -s build

License

This project is licensed under GPL-v3.