Skip to content

BloomTech-Labs/dep-story-squad-be-a

Repository files navigation

Story Squad back end and API

Disclaimer: This is not a production version yet.

Requirements

Demo Videos

GoogleDrive

Labs-28

Contributors

M Groesbeck
Harrison Seaborn

API documentation

All routes can be viewed in the /documentation/APIDOCS.md file

DB documentation

Table info can be viewed in the /documentation/DBDOCS.md file

Tech Stack and Third-Party Services

Node.js + Express.js

  • Flexible and well-supported framework for back-end and API

PostgreSQL

  • Relational database for structured storage and retrieval of data
  • Supports JSON object storage for flexible architecture
  • Knex.js to build queries in JS back end

Okta

  • Third-party authentication and access management
  • Transparent for end user, but adds additional security for personal information
  • Account passwords are not saved to Story Squad database (not even account password hash)

Stripe

  • Third-party payment processing
  • Allows offline payment processing
  • Financial information is never saved to Story Squad database

Getting Started

  • run: npm install to download all dependencies.
  • You will need to set up a database connection for local development and establish the connection in the env under database_url
    example-- postgresql://postgres:password@localhost/storysquad-dev
  • you will also need to set up the rest of your env variables.. see labs-28 demo video for further assistance
  • run: npm run knex -- migrate:latest to create the starting schema.
  • run: npm run knex -- seed:run to populate your db with some data.
  • run: npm run server to start your local development server.

Environment Variables for Dev/Testing

PORT=8000
>PG_CONNECTION_STRING=postgres://docker:[email protected]:5400/api-dev
>NODE_ENV="testing"
>BASE_URL="https://localhost:8000"
>SESSION_SECRET="another secret"

Okta, PostgreSQL, etc. environment variables should not be included in this readme or repo.

Contributing

ESLint and prettier

ESLint and prettier are already configured with Lambda Labs standards and ready to go. These must be ran from the CLI prior to commiting code in the following ways:

  • npm run lint to view all purposed fixes.
  • npm run lint:fix to apply fixes to eslint issues.
  • npm run format to apply the standards defined by eslint/prettier config.

Alternatively you can install plugins for your editor of choice.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published