Zero.info.bo
- 4 Devlogs
- 12 Total hours
Making zero an actual ecosystem creating a auth system and other stuff
Making zero an actual ecosystem creating a auth system and other stuff
If you are reading this without any prior context, you might be asking:
This project involves turning my portfolio into a full-blown “personal company” platform by adding OAuth and other features.
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!
Here are some pictures of what I’ve made:
First you may be reading this without knowing the context so you may ask:
This project involves turning my portfolio into a full own “personal company” by adding oauth and other features
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 (;