Code Monkey home page Code Monkey logo

members's Introduction

Deprecation Notice

The underlying technology that we previously used for the backend of this project has shut down. After considering the amount of effort to migrate the project to another technology and the availability of volunteers to do this work, we decided to deprecate this project for now. Some of the original features for this project have been adopted by the Code for Denver Scout project

If you are interested either reviving this project or integrating some of the features of this project into either the Code for Denver website or Scout project, talk to the Code for Denver Leadership.

Build Status

members.codefordenver.com

Online portal for Code for Denver member resources

screen shot of website


Requirements

  • Node.js - version 10.8.0 (if you have nvm type nvm use in the repo to use the correct version)

Setup:

  1. clone repo

  2. cd into repo directory

  3. Run npm install

    You may also want to install a prettier plugin for your editor. Check here for setup instructions

  4. Follow the following instructions to set up Auth0 and the API Explorer:

    1. 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.

      1. Select API from the side menu
      2. Select Auth0 Management API
      3. Select the API Explorer tab
      4. Select CREATE & AUTHORIZE A TEST CLIENT. This creates a client that can use the Management API.
      5. Select Applications from the side menu
      6. Select API Explorer Application

    (To enable Log In/ Sign Up functionality, please go to your Auth0 dashboard, navigate to "Hosted Pages", and enter the following: initialScreen: config.extraParams.initial_screen, on line 46 (within the Auth0Lock third argument object))

  5. Go the the command line and run npm run setup (You will be asked for the Domain, Client ID, and Client Secret from the API Explorer Client. Paste them into the command line). This will create the .env.local file in the root of the project.

  6. run npm run gc -- deploy

  7. Enter in the following information in your terminal: graphcool deploy info graphcool deply target name graphcool deploy service name

  8. If prompted to authenticate, enter in the Auth URL into your browser

  9. Sign up for Graphcool

  10. from the output from the previous command copy the Simple API url and add it to the .env.local file for variable REACT_APP_GRAPHCOOL_API

  11. run npm start

Quick Start

After you've followed the set up steps listed above, you can subsequently start the app with:

npm start

Developing

Create React App

The front end for this project was bootstrapped with Create React App. Make sure to check out the excellent docs for the project here. They outline info about the project as well as how a bunch of ways to configure it and add different tools and libraries.

Interacting with the Backend

This project uses graphql for the API layer (see the section on the server for more info). Queries and mutations should be written in .graphql files in the src/graphql directory. Read the following section for information on how to use these in the React code.

Code Generation

This project uses graphql-code-generator to generate code based on graphql files. When you start the app with npm start it will also start graphql-code-generator in watch mode so the generated files will automatically get updated. These generated files are based on a local json version of the schema (updated with npm run download-schema).

With this tool, the names of graphql queries and mutations will have associated TypeScript types defined in ./src/generated-models.tsx. Do not update this file manually. Instead, either run npm start or npm run graphql-codegen and the types will be updated.

Apollo

The generated code mentioned in the above section uses the library react-apollo. Check out their docs here.

Material-UI

This project uses Material-UI for theming. Be sure to check out their component demos, like this one for avatars.

Server: Graphcool

The Graphcool framework is used to spin up and manage the backend for this project.

  1. Use locally installed version of framework with environment variable from .env.local
  • npm run gc -- <command>
  1. View list of available commands
  • npm run gc -- help
  1. Deploying the backend changes
  • npm run gc -- deploy

    NOTE: After deploying changes to the backend make sure to run npm run download-schema to update the local schema for proper code generation and eslint configuration

  1. Interactive console to test out GraphQL
  • npm run gc -- playground

Debugging

General

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.

Tests

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. You can also debug tests using the VSCode Jest plugin (see the next section).

Additional Tooling

Browser Extensions

There are a few highly recommended browser extensions that will help you debug and test code:

Editor Plugins

It is recommended to install some editor plugins to help with development. Here are some great VSCode plugins:

Additional Information

Linting

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.

Typescript

This project uses typescript a superset of javascript with static typing. If this is your first exposure to Typescript, check out this intro guide.

It is highly recommended that you use an editor that supports typescript type checking and additional features (like autocomplete). VS Code is a great option that supports Typescript out of the box.

Additionally, you have the option to run typechecking from the command line directly with npm run typecheck

members's People

Contributors

2kiq avatar anotherpatrickcollins avatar aziobrow avatar cvanem avatar dchao19 avatar debugsteven avatar dviramontes avatar eemshi avatar eosem avatar evanplaice avatar feldbot avatar fredmon3 avatar jberns avatar jecortez avatar jksmall0631 avatar jsmith197 avatar justinkimtang avatar marshallhouston avatar mikeludev avatar mugwump303 avatar nlkluth avatar renniesb avatar roman2193 avatar seankwilliams avatar sungbae avatar w0de avatar waffle-iron avatar wdoug avatar zacksabbath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

members's Issues

make a <HelpUsImplementThisFeature/> component

As a developer

I would like a React component that shows a tooltip of some sort over its child elements that requests help on implementing a feature so that I can easily specify that certain content in the app hasn't been made into a functional feature yet

Additionally this can link to a waffle card associated with the feature needed to be impletemed.

Connect to Meetup

  • log in with meetup?
  • link to meetup profile
  • pull in interests
  • meeting RSVPs

feat: add inspiration component

As a member i would like a text field where I submit a sentence or two about why I joined CFD.

We should limit the character length to 140 characters.

feat: show modal for user agreement

  • Explain the why we need this information and how we intent to use it

  • Make clear what we will be public and what is private

Do this so that a member can accept the service agreement and control which pieces of information are made public.

Fix https on the site

Currently, members.codefordenver.org doesn't enforce https, and when you do go to https it appears to be using the github certificate so you get a warning about it not being secure.
Screen Shot 2018-01-02 at 9.49.13 AM.png

Add member since ...

As a member I would like to see how long I've been contributing to CFD. I would I also like a way to edit my contribution beginning time to reflect actual time.

List view of members

As a user, I would like an overview list of who is a member of the organization, so I can find members to view their profiles.

Admin: View list of new user emails for adding to flowdock

As a Code for Denver admin onboarding new members, I would like an easy way to invite new members to Flowdock.

I believe the simplest way of achieving this initially is to put a list show a comma-separated list of emails of users (preferably filtered to be just those that signed up in the last week).

Add profile view

As a user, I would like to be able to see my profile and the profiles of other members in Code for Denver.

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.