Skip to content

Latest commit

 

History

History
 
 

web

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Web

This is the Celo website, which is deployed to https://celo.org/

Developing

You can run the local version by first ensuring you have installed the latest dependencies:

yarn

then by decrypted the secrets file, this requires being authenticated on gcloud

brew cask install google-cloud-sdk && gcloud auth login

from root of monorepo run yarn run keys:decrypt

and then running

yarn run dev

which will start a server accessible at http://localhost:3000

Testing

run tests with yarn test

tools: jest, @testing-library/react

Testing Strategy

Each page should have a snapshot test found in src/_page-tests more interactive components should have an additional tests for various states/ interactions.

Architecture

The website uses React.js, Next.js, and React Native Web. React is a great library for building user interfaces. Next.js takes care of server-rendering React apps in a simple way and preloading/transitioning pages quickly. React Native web allows us to use the same code in the application on the website, specifically the way we do CSS.

Deployment

The website is hosted on Google App Engine. In order to deploy it, you first need the gcloud SDK.

brew cask install google-cloud-sdk

You may need to log in and be granted additional permissions.

gcloud auth login

Make sure your dependencies are up to date. in this directory, run:

yarn

Now you can run

yarn run deploy:dev

to deploy to the dev environment, with similar commands for staging and prod