K.G.E.

Bun/Node FullStack Decoupled: Notes Manager


This Notes Manager could be a reference point if you want to enjoy a full stack application!
I have made it decoupled, so that backend and frontend can be used independently.

About

I could not find any good examples for elysia, better-auth! So build my oun example for self-reference.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

If you have a liking to Node+npm.
You can replace bun (or bun --bun) with npm.

Prerequisites

What things you need to install the software and how to install them.

Installing

Running this application in local would require running two bun/node instances front end and backend!

Setup DB

Create db name 'users'. I am using user pgelysia, feel free to use postgres as user. helping script:

  • CREATE DATABASE users;
  • CREATE USER pgelysia WITH ENCRYPTED PASSWORD 'fullstack';
  • GRANT ALL PRIVILEGES ON DATABASE users TO pgelysia;
  • \c users postgres
  • (# You are now connected to database "users" as user "postgres".)
  • GRANT ALL ON SCHEMA public TO pgelysia;

Make sure to use right user and db name ``` postgres://pgelysia:fullstack@localhost:5432/users ```

Setup Backend

cd poc-backauth
bun install

Below command will create db tables based on schema provided in folder 'schema'

bunx drizzle-kit push
bun run dev

Setup Frontend

cd poc-webauth

install dependencies:

bun install

Run application:

bun run dev

localhost:

Build-With

  • Bun
  • Node
  • Elysia JS
  • drizzle orm
  • better-auth
  • svelte
  • vite

Author(s)

Top categories

Loading Svelte Themes