mkchang / PassPass

Get access to subscription pass memberships without a subscription

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PassPass

Pass Pass is a digital marketplace to allow ClassPass users to sell extra passes.

Users can post:

  • Number of passes they have available for sale
  • Price per pass
  • Date range passes are valid
  • Excluded studio locations, where they have already used their membership, as ClassPass restricts visits to the same studio per subscription month

Users can browse other user’s passes for sale, and filter by those same criteria; buyers can contact sellers by email to discuss the purchase.

Team

Table of Contents

  1. Usage
    1. App
  2. Requirements
  3. Development
    1. Installing Dependencies
    2. Testing
    3. Roadmap
  4. Contributing
  5. Deployment

Usage

App

https://hungryhippopasspass.herokuapp.com/

Requirements

  • Node 6.11.x
  • npm 3.10.x
  • MySQL 5.7

Development

Installing Dependencies

Fork and clone the repo. From within the root directory: https://github.com/TheRealHungryHippos/PassPass

npm install

Add facebook.config.js file for facebook session keys, use facebook.example.config.js as a template. Add session.config.js file for session encryption key, use session.example.config.js as a template. Install the database by running the schema.sql file with instructions at the top of that file

Launch webpack with npm run react-dev. Launch the server with npm run server-dev. Go to http://127.0.0.1:3000/ in your browser to run locally If you need to change the port, do that in the server/index.js file at the bottom

Testing

Tests are done with Jest and Enzyme. Other packages used:

Run tests in repo root folder with

npm test

Test results will be output to the terminal window.

Tests are split into 3 folders: react-client, server, and database, to match the equivalent folders with JavaScript source code.

Checking test coverage is TBD.

Roadmap

View the project roadmap on Trello here

Contributing

See CONTRIBUTING.md for contribution guidelines.

Deployment

To deploy on Heroku:

Add ClearDB's addon, use the free ignite database. This will automatically add a CLEARDB_DATABASE_URL config variable. This is in the format of:

mysql://<username>:<password>@<hostname>/<database name>?reconnect=true

To add the schema to ClearDB, run the following command in your terminal:

mysql -h <hostname> -u <username> -p <database name> < schema.sql

it will then prompt you for your password. You can log in to your data base by running only mysql -h <hostname> -u <username> -p <database name>. You will have to use <database name> after logging in. Note this means your database name is different than you may be using in your schema.sql for local development.

Additional config variables to be set are:

  • FB_CALLBACKURL
  • FB_CLIENTID
  • FB_CLIENTSECRET
  • SESSION_SECRET

These replace the two config files used for local develpoment, facebook.config.js and session.config.js.

Set config variables for both production and staging parts of your heroku pipeline. Review Apps will inherit config vars from your chosen app, but the app.json in your root folder must specify that these variables are to be inherited. To do so, mark those variables are required, but do not provide in app.json.

About

Get access to subscription pass memberships without a subscription


Languages

Language:JavaScript 100.0%