Code Monkey home page Code Monkey logo

tinyhouse-dev's Introduction

Tinyhouse Development

Table of Contents

About

A demo of the site is available here.

This is the development repository for Tinyhouse, a rental marketplace built with React, TypeScript, Node, GraphQL, and MongoDB, and deployed on Heroku. The deployment repository for this project is available here.

The documentation for this repository is still being written.

Getting Started

Prerequisites

This application relies on a number of environment variables to set up.

Setting Up Your Environment Variables

In the server directory, we will need to create a .env file at server/.env with the following shape:

# server/.env

PORT=9000
DB_USER=<your_db_username>
DB_USER_PASSWORD=<your_db_password>
DB_CLUSTER=<your_db_cluster_name>
PUBLIC_URL=http://localhost:3000
G_CLIENT_ID=<your_oauth_clientid>
G_CLIENT_SECRET=<your_oauth_client_secret>
G_GEOCODE_KEY=<your_google_geocode_id>
SECRET=<some_secret>
NODE_ENV=development
S_SECRET_KEY=<your_stripe_secret>
CLOUDINARY_NAME=<your_cloudinary_bucket_name>
CLOUDINARY_KEY=<your_cloudinary_key>
CLOUDINARY_SECRET=<your_cloudinary_secret>

Additionally, we will need to create a .env file in the client directory at client/.env with the following shape:

# client/.env
REACT_APP_S_PUBLISHABLE_KEY=<your_stripe_publishable_key>
REACT_APP_S_CLIENT_ID=<your_stripe_client_id>

Note: When we build our React app, the Create React App scripts simply inline the values of our environment variables in our code at build time. For this reason, the environment variables in our React app should never be secret.

Database Environment Variables

Google OAuth Environment Variables

Google Geocode API Environment Variables

Stripe Environment Variables

Cloudinary Environment Varibales

Usage

While developing, you will likely want to seed your app with mock data. To seed your database, in the server folder, run:

npm run seed

When you get the success messages, press ^C to exit.

It may be useful at times to clear the database. To do so, in the server folder, run:

npm run clear

When you get the success messages, press ^C to exit.

tinyhouse-dev's People

Contributors

archaengel avatar

Watchers

 avatar  avatar  avatar

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.