Skip to content

Full-stack application to share and borrow items. Built using Node, Express, PostgreSQL, Apollo / GraphQL & React

Notifications You must be signed in to change notification settings

alexfts/boomtown-item-sharing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boomtown 🏙

Boomtown is a web application used to share and borrow items. This repository contains both client- and server-side code. The project uses Node, Express & Apollo on the server side and React, Apollo Client, React-Redux, React Router & React Final Form on the client side. It supports user authentication and persists user and item data in a Postgres database.

Image of Boomtown


User Flow

Once signed up at the /welcome route, the user can browse the available items they wish to borrow at /items, then request to borrow them. They can share their own items by filling out the form on the /share page. They can view the items they've shared or borrowed and return the borrowed items on the /profile page.


The Stack

Backend/Front-end Technologies Used
Backend PostgreSQL, Node, Express, JWT, and GraphQL (Apollo).
Front-end React, Redux, React Router, React Context, Final Form, Apollo Client

Server

The server utilizes Apollo's Express middleware to enable flexible queries from the client. Unauthenticated users are able to query the login, # and viewer endpoints. Authenticated users are able to query user, item and tags and are allowed to mutate the data in Postgres through addItem, borrow & return endpoints, as well as to logout.

Note that running the server requires an active instance of PostgreSQL running locally.

Commands must be run from the server directory:

Installation

npm install

Run

Development

npm run start:dev

Production

npm start

Retrieving data requires an active Postgres instance.

Tests

Just linting:

npm run lint

Run linting, and fix any errors:

npm run lint:fix

Run Jest tests:

npm run jest

Run Jest tests, and watch for changes:

npm run jest:watch

Run all tests:

npm run test

Client

The client is written in React. It utilizes Apollo client to interact with the server through GraphQL, React Context to retrieve the viewer, React Router for routing. The /share page contains a form (built w/ React Final Form) that changes the item preview automatically upon the user interacting with the form inputs. The state between the form and the preview is shared through React Redux.

Commands must be run from the client directory:

Installation

npm install

Run

npm start

Build

npm run build

Tests

Just linting:

npm run lint

Run linting, and fix any errors:

npm run lint:fix

Run all tests:

npm run test

About

Full-stack application to share and borrow items. Built using Node, Express, PostgreSQL, Apollo / GraphQL & React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published