Code Monkey home page Code Monkey logo

edgedb_hackathon_fullstack_auth's Introduction

Productivus: Efficiently manage your task

This repo is for my submission for the EdgeDB hackathon which took place during April 26 — May 26, 2024

Getting Started

Prerequisites

**Node.js 18.17 or later. **macOS, Windows (including WSL), and Linux are supported. **EdgeDB CLI (It is preferred that you have it already setup, but below I am writing the instruction on how to install below. Refer to the link mentioned if you are having difficulties.)

Install EdgeDB CLI

Linux and Mac

curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh

Windows Powershell

iwr https://ps1.edgedb.com -useb | iex

For more installation options, see the EdgeDB installation guide.

To directly clone the repo

git clone https://github.com/trace2798/edgedb_hackathon_fullstack_auth.git

Install packages

npm i

Setup .env file

UPLOADTHING_SECRET=
UPLOADTHING_APP_ID=

Initiating EdgeDB

edgedb project init

After running that command it will ask you to specify the name of the instance with a default value. You can just press Enter and use the default value.

Then it should ask you to specify the branch name with default as main. Keep it that way.

image

Then run

edgedb ui 

I should open up the EdgeDB GUI. Then click on main --> Data viewer. Then you should see the tables which has been defined on the schema

image

Setting up Authetication

For this application I have used EdgeDB auth with the Github provider. For that you can follow the guide mentioned on their official website. EdgeDB Auth Guide

I have used the GUI to set the auth for my application. I have taken the following steps:

  1. Click on auth admin icon on the left sidebar. It is the 6th option. A screen like below should appear image

  2. Fill it up with your desired name and I did keep the allowed_redirect_urls field empty.

  3. Cick on Providers --> Add Provider. For this application I have used Github. Fill in with your Client ID and Secret. I kept my additional scope blank.

  4. To get the Github ID and Secret do the following Go to your github account --> settings --> Developer settings --> Oauth Apps. Then create a new app by clicking on "New OAuth App"

  5. On github both the Homepage URL and Authorized Callback URL has been set to http://localhost:3000/

Start the app

npm run dev

Available commands

Running commands with npm npm run [command]

command description
dev Starts a development instance of the app
build To build your application
start Starts a production instance of the app

"prebuild": "npx @edgedb/generate edgeql-js" is required if you want to deploy your site to vercel.

edgedb_hackathon_fullstack_auth's People

Contributors

trace2798 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.