Skip to content

holdonowgo/chuck-butt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Chuckster

a little Twitter clone
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

![Product Name Screen Shot][product-screenshot]

Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor for the following: github_username, repo_name, twitter_handle, linkedin_username, email_client, email, project_title, project_description

(back to top)

Built With

  • [![Next][next.js]][next-url]
  • [![React][react.js]][react-url]
  • [![Vue][vue.js]][vue-url]
  • [![Angular][angular.io]][angular-url]
  • [![Svelte][svelte.dev]][svelte-url]
  • [![Laravel][laravel.com]][laravel-url]
  • [![Bootstrap][bootstrap.com]][bootstrap-url]
  • [![JQuery][jquery.com]][jquery-url]

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • Install node via nvm

    via homebrew

    brew update
    brew doctor
    brew install nvm
    mkdir ~/.nvm
    
    <!-- setup path -->
    echo "export NVM_DIR=~/.nvm\nsource \$(brew --prefix nvm)/nvm.sh" >> .zshrc
    source ~/.zshrc
    
    <!-- show the version of nvm you have installed -->
    nvm -v

Database

  1. Install postgresql

    brew update
    brew doctor
    brew install postgresql
    
    <!-- start postgres -->
    brew services start postgresql
    
    <!-- stop postgres -->
    brew services stop postgresql
  2. Create Database

    psql postgres
    CREATE ROLE ${role} WITH LOGIN PASSWORD ${password};
    ALTER ROLE ${role} CREATEDB;
    CREATE DATABASE chuckster OWNER ${role}

Installation

  1. Clone the repo

    git clone https://github.com/holdonowgo/chuck-butt.git
  2. Switch to proper node version

    $ nvm use
    
    Found '<proj-root-dir>/.nvmrc' with version <v16>
    N/A: version "v16 -> N/A" is not yet installed.
    
    You need to run "nvm install v16" to install it before using it.
    
    <!-- check the version of node you are using -->
    $ nvm current
    v16.17.1
  3. Install NPM packages

    npm install
  4. Setup your local .env file

    • from project root dir
    touch .env
    • The .env file should have the values for the keys listed below. Edit the values as needed
     PORT=8000
    
     <!-- development | test | production -->
     NODE_ENV=development 
    
     <!-- dev values -->
     DEV_JWT_SECRET=secret
     DEV_DATABASE_NAME=chuckster
     DEV_DATABASE_URL=postgres://Randall.Spencer:postgres@localhost:5432/chuckster
     DEV_DATABASE_USERNAME=Randall.Spencer
     DEV_DATABASE_PASSWORD=
    
     <!-- test values -->
     TEST_JWT_SECRET=secret
     TEST_DATABASE_NAME=chuckster
     TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/chuckster-test
     TEST_DATABASE_USERNAME=testusername
     TEST_DATABASE_PASSWORD=testpassword
    
     <!-- prod values -->
     JWT_SECRET=secret
     DATABASE_NAME=chuckster
     DATABASE_URL=postgres://postgres:postgres@localhost:5432/chuckster
     DATABASE_USERNAME=produsername
     DATABASE_PASSWORD=prodpassword
  5. Create pub/priv keys

    • This key will be used as the JWT secret to sign JWT tokens
    <!-- In project root directory -->
    
    <!-- private key -->
    ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
    
    <!-- public key -->
    openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
    • See src/index.ts for usage
    const RSA_PRIVATE_KEY = fs.readFileSync(__dirname + '/../jwtRS256.key');
  6. Run DB Migrations

    • from root directory of project
    ts-node ./db/migrate.ts
  7. Populate DB with seed data

    • TBA

(back to top)

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Feature 1
  • Feature 2
  • Feature 3
    • Nested Feature

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @twitter_handle - email@email_client.com

Project Link: https://github.com/holdonowgo/chuckster

(back to top)

Acknowledgments

(back to top)

About

Backend GraphQL for Chuckster Twitter Clone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published