Skip to content

Authentication Boilerplate with Create React App and Apollo GraphQL built with typescript

License

Notifications You must be signed in to change notification settings

Zoot01/react-apollo-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

react-apollo-auth

Authentication Boilerplate with Create React App and Apollo GraphQL built with typescript and MongoDB. Making use of Jwt access and refresh tokens and the powerful Apollo Context API.
Report Bug · Request Feature

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

About The Project

profile-screenshot login-screenshot signup-screenshot

This is a blank boilerplate template for anyone looking to use Create React App and Apollo GraphQL, with authentication. This template uses Cookies for more secure authentication and authorization. This authentication Boilerplate with Create React App and Apollo GraphQL built with typescript and MongoDB. Making use of Jwt access and refresh tokens and the powerful Apollo Context API.

(back to top)

Built With

  • React
  • MongoDB
  • Typescript
  • Apollo GraphQL
  • Expressjs

(back to top)

Getting Started

Please follow the simple steps below to get the project running on your local machine.

Prerequisites

You will need a local instance of MongoDB or a MongoDB atlas connection, along with NodeJS and NPM.

Installation

  1. Clone the repo

    git clone https://github.com/Zoot01/react-apollo-auth.git
  2. Install NPM packages for the client

    cd client
    npm install
  3. In a new terminal install NPM packages for the server

    cd server
    npm install
  4. Enter environment variables by chaning .env.example to .env and entering variables

    DATABASE_URL = "mongodb://localhost:27017/react-apollo-auth";
    JWT_ACCESS_SECRET = "somereallylongsecretkey";
    JWT_REFRESH_SECRET = "somereallylongsecretkey";
  5. Start the client

    cd client
    npm run start
  6. Start the server

    cd server
    npm run dev
  7. Vist application and explore

     Local:            http://localhost:3000
     On Your Network:  http://192.168.1.153:3000

(back to top)

Usage

Register a user and login to see all the the applications features. This is just a starting point, explore, add, contribute, critique. Remember this is a bolierplate so features are minimal. The goal is to keep this a barebones as possible.

(back to top)

Roadmap

  • [✅] Jwt Access Token Cookie - Short lived 30 seconds
  • [✅] Jwt Refresh Token Cookie - Long lived 7 days
    • [📛] Add use authorization roles
  • [✅] User Profile Dropdown
  • [✅] React Context API
  • [✅] GraphQL Codegen

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

(back to top)

Contributing

Contributions are what make things better. Please contribute!

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

Discord: Zoot#7045

Project Link: https://github.com/Zoot01/react-apollo-auth

(back to top)

About

Authentication Boilerplate with Create React App and Apollo GraphQL built with typescript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published