An open API service indexing awesome lists of open source software.

https://github.com/kisan-engg/bun-fullstack

bun/node decoupled full stack: Notes manager
https://github.com/kisan-engg/bun-fullstack

app application authentication authrization backend better-auth bun decoupled drizzle elysia example frontend fullstack learning node postgresql svelte tailwind tutorial web

Last synced: 6 months ago
JSON representation

bun/node decoupled full stack: Notes manager

Awesome Lists containing this project

README

          




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.

- Bun
- OR Node
- PostgreSQL

## 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:

![alt text](image.png)

## Build-With
- Bun
- Node
- Elysia JS
- drizzle orm
- better-auth
- svelte
- vite

## Author(s)
- Rajeev Kr. Aryan (@kisan-engg)