You are browsing as a guest. Sign up (or log in) to start making projects!

Zero.info.bo

  • 4 Devlogs
  • 12 Total hours

Making zero an actual ecosystem creating a auth system and other stuff

Ship #1

# Zero

If you are reading this without any prior context, you might be asking:

## What is this project?

This project involves turning my portfolio into a full-blown "personal company" platform by adding OAuth and other features.

## What did I do?
Ive created my own OAuth system with full blown image uploading and etc.
It has all of this features
- Hackclub Auth
- 2FA
- Password managment
- Profile picture Managment
And other tons of features
It also has like a ton of security like a ton like encryption sha un guessable random stuff etc etc..

## How to use it for yourself
First clone the github repo using:
```cmd
git clone https://github.com/Franco-Senes/Zero.git
```
Then cd to the carpet
```cmd
cd Zero
```
After that cd to the server
```cmd
cd Server
```
Then download the dependencies
```cmd
npm install
```
Then create a .env using this template
```env
PORT=3000
JWT_SECRET=
ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
HACKCLUB_CLIENT_ID=
HACKCLUB_CLIENT_SECRET=
HACKCLUB_REDIRECT_URI=http://localhost:3000/api/auth/hackclub/callback
```
After start the server finally
```cmd
npm run dev or npm start
```
If you see this:
```cmd
> [email protected] dev
> node server.js

◇ injected env (6) from .env // tip: ⌘ override existing { override: true }
Zero.info.bo - Server
Running on http://localhost:3000
Franco was here (;
------- Debug --------
ignored colum exists
ignored colum exists
ignored colum exists
```
Then you are all buckled up (;

## Thanks for reading (;

  • 4 devlogs
  • 12h
  • 2.12x multiplier
  • 26 Stardust
Try project → See source code →
Open comments for this post

5h 12m 1s logged

Finished the Frontend

If you are reading this without any prior context, you might be asking:

What is this project?

This project involves turning my portfolio into a full-blown “personal company” platform by adding OAuth and other features.

What did I do?

First, I organized the project into the following directory structure:

|── app/ # Main Frontend      
|   ├── js/
|   ├── css/
|   ├── index.html
|   └── icon.png    
|── auth/  #Frontend for auth
|   ├── css/
|   ├── js/ 
|   ├── account.html   
|   └── oauth.html 
|── server/    # Main Backend
    ├── uploads/  
    ├── database.js     
    ├── server.js
    ├── package.json    
    ├── zero.db    

After that, I started creating /app/ and decided that for styling I would use Tailwind CSS because it would be easier and more compact. It will impact compatibility a little bit, but not by that much.
After doing that, I made the account settings and other core pages.
For what I am doing, I am really proud of what I have accomplished right now. After writing this, I will make my README.md, publish it to GitHub and zero.info.bo, and ship it!

Thanks for reading (;

Here are some pictures of what I’ve made:

0
0
4
Open comments for this post

2h 32m 40s logged

Finished the back end

First you may be reading this without knowing the context so you may ask:

What is this project

This project involves turning my portfolio into a full own “personal company” by adding oauth and other features

What did i do

I think it is in the title that i finished the backend but if you keep asking i added all of this to my backend

  • Register (POST /api/auth/register)

  • Login (POST /api/auth/login)

  • 2FA Login (POST /api/auth/login-2fa)

  • Logout (POST /api/auth/logout)

  • Get current user profile (GET /api/auth/me)

  • Change password with 2FA check (POST /api/user/change-password)

  • Upload avatar with webp conversion and sharp resizing (POST /api/user/avatar)

  • Create oauth app (POST /api/oauth/apps)

  • Get my oauth apps (GET /api/oauth/apps)

  • Get authorized oauth apps (GET /api/oauth/authorized-apps)

  • Revoke oauth app authorization (DELETE /api/oauth/authorized-apps/:client_id)

  • 2FA setup and qr generator (POST /api/user/2fa/setup)

  • 2FA verify and activate (POST /api/user/2fa/verify)

  • 2FA disable (POST /api/user/2fa/disable)

  • Toggle 2FA required on login (POST /api/user/2fa/toggle-login)

  • OAuth authorize endpoint (GET /oauth/authorize)

  • OAuth consent endpoint (POST /oauth/consent)

  • OAuth token exchange endpoint (POST /oauth/token)

  • OAuth userinfo endpoint (GET /api/userinfo)

So yeah thats it also forgot to add hackclub as a login method ill do that later
So thanks for reading (;

0
0
1
Open comments for this post

32m 45s logged

decided to add 2fa for now everything is going good planing to add 2fa as a login method and hackclub also idk what image to put here so ill put the first image that appears on my pinterest

0
0
1

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…