Node.js application that connects volunteers with volunteers/projects based on their skill sets.
- Node.js - version 8.9.3 (if you have nvm type
nvm use
in the repo to use the correct version)
Setup:
-
clone repo
-
cd into repo directory
-
Run
npm install
You may also want to install a prettier plugin for your editor. Check here for setup instructions
-
Follow the following instructions to set up Auth0 and the API Explorer:
- Visit https://auth0.com/ and create a new Auth0 account or log-in to your existing one
it will ask you for a tenant domain. Here you can just enter in your username as this will be used for the API endpoints of your clients.
- Select
API
from the side menu - Select
Auth0 Management API
- Select the
API Explorer
tab - Select
CREATE & AUTHORIZE A TEST CLIENT
. This creates a client that can use the Management API. - Select
Applications
from the side menu - Select
API Explorer Application
- Select
- Visit https://auth0.com/ and create a new Auth0 account or log-in to your existing one
-
Go the the command line and run
npm run setup
(You will be asked for theDomain
,Client ID
, andClient Secret
from theAPI Explorer Client
. Paste them into the command line). This will create the.env.local
file in the root of the project. -
run
npm run gc -- deploy
-
If prompted to authenticate, enter in the
Auth URL
into your browser -
Sign up for Graphcool
-
from the output from the previous command copy the
Simple API
url and add it to the.env.local
file for variableREACT_APP_GRAPHCOOL_API
-
run
npm start
After you've followed the set up steps listed above, you can subsequently start the app with:
npm start
Start your app by running npm start
, and start debugging in VS Code by pressing F5
or by clicking the green debug icon with Chrome
as the selected configuration. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
Start debugging in VS Code by pressing F5
or by clicking the green debug icon with Debug CRA Tests
as the selected configuration. You can now write tests, set breakpoints, make changes to the tests, and debug your newly modified tests—all from your editor.
The Graphcool framework is used to spin up and manage the backend for this project.
- Use locally installed version of framework with environment variable from
.env.local
npm run gc -- <command>
- View list of available commands
npm run gc -- help
- Deploying the backend changes
npm run gc -- deploy
- Interactive console to test out GraphQL
npm run gc -- playground
This project employs the ESLint plugin eslint-plugin-graphql to help developers write schema-compliant GraphQL queries. This plugin will red-line invalid queries that are not schema compliant if you are using an editor with an installed ESLint plugin. If a query fails validation and hence the lint, the travis build will fail as well.
The schema file is checked in to the root directory of the repository as full-schema.json
. If the schema on Graphcool is updated and full-schema.json
is out of date. It is necessary to run the download-schema
NPM script in order to update linting information.
This project uses Material-UI for theming. Be sure to check out their component demos, like this one for avatars.
The front end for this project was bootstrapped with Create React App. Here are some generated docs from this project for helpful tips on how to do common things.