Giter VIP home page Giter VIP logo

signedin-public's Introduction

SignedIn: A login website using React and Pocketbase

Features

  • Sign in
    • Sign in with GitHub
  • Sign up
    • Sign up with GitHub
  • Reset password
  • Verify email
    • Gold Checkmark System. (This is a feature that allows the admin to give special users a gold checkmark next to their name via the database admin panel.)

What is this?

SignedIn is an example of how to use React and Pocketbas to build a login website. It is a website that allows users to sign in, sign up, reset their password, and verify their email. It also has a feature that allows the admin to give special users a gold checkmark next to their name via the database admin panel. It also uses GitHub OAuth to allow users to sign in and sign up with their GitHub account.

How to run locally and/or deploy to a remote server

  1. Clone the repo
git clone https://github.com/Zfauser/SignedIn-Public.git
  1. Install dependencies
npm install
  1. Run the app  

    3.1. Development mode

    In one terminal window, run:

    npm start

    In another terminal window, run:

    ./pocketbase serve

    The pocketbase executable included is the MacOS version. If you are using a different OS, you can download the executable from here

    NOTE: You will also need to change all of the database urls and redirect urls in the files to your own. By default, the pocketbase server url will be http://127.0.0.1:8090 and the web site will be run on http://127.0.0.1:3000. You will also need to add your own GitHub OAuth info on the Admin panel.

      3.2. Production mode

    npm run build

    Then deploy the build folder to any type of web server. (apache, nginx, etc.)

    Then deploy pocketbase to another server. (You might be able to run it on the same server as the web server through something like a reverse proxy, but I haven't tested it.)

    Then run the following command to start pocketbase via http & https. (you should setup something to make it so this command runs at startup using something like systemd)

    ./pocketbase serve --http="example.com:80" --https="example.com:443"

    Pocketbase is supposed to automatically get a SSL certificate from Let's Encrypt, but it didn't work for me, so I had to manually get another certificate from Certbot and then put it in the pb_data folder on the server.  

How I deployed it

I deployed the static files to an existing apache server I use to run all my other websites. I also needed to get a new SSL certificate for the domain I was using (signedin.zachfauser.com). I used Certbot to get the certificate. I then needed to create a new Oracle Cloud Virtual Machine to run database. I used the same specs as the apache server (2 core arm cpu, 12gb ram, ubuntu). I then installed pocketbase on the new server. I also got a new SSL certificate for the pocketbase server on the domain I was using. I then created a simple Systemd service to make the pocketbase server start on startup and run in the background.

Links to the technologies used

signedin-public's People

Contributors

zfauser avatar

Stargazers

 avatar

Watchers

 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.