https://github.com/sanketghosh/nerdvana
Share, discuss, and explore all things nerdy!
https://github.com/sanketghosh/nerdvana
bun hono postgresql react shadcn-ui tailwindcss tanstack typescript
Last synced: 6 months ago
JSON representation
Share, discuss, and explore all things nerdy!
- Host: GitHub
- URL: https://github.com/sanketghosh/nerdvana
- Owner: sanketghosh
- License: mit
- Created: 2024-10-24T08:06:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:35:04.000Z (over 1 year ago)
- Last Synced: 2025-02-05T11:51:20.007Z (about 1 year ago)
- Topics: bun, hono, postgresql, react, shadcn-ui, tailwindcss, tanstack, typescript
- Language: TypeScript
- Homepage: https://github.com/sanketghosh/nerdvana
- Size: 120 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
nerdvana
A simple, quick and minimal note taking experince inside your web browser.
## Table of Contents
1. [Introduction](#introduction)
2. [Tech Stack](#tech-stack)
3. [Features](#features)
4. [Quick Start](#quick-start)
## Introduction
## Tech Stack
- React (No meta framework)
- Tailwind
- ShadcnUI
- TypeScript
- Bun
- Markdown
- Express
- Sqlite
- PrismaORM
## Features
- **Coming soon**: working on it.
## Quick Start
Follow these steps to set up the project locally on your machine.
**Prerequisites**
Make sure you have the following installed on your machine:
- [Git](https://git-scm.com/)
- [Bun](https://bun.sh/)
**Cloning the Repository**
```bash
git clone https://github.com/sanketghosh/fastNotes.git
cd ch88r
```
Now we will install `client` dependencies and `api` dependencies separately one by one. Let's install the **client** dependencies first and then **api**:
**Client Installation**
Install the front-end / client dependencies using `bun`:
```bash
cd client
bun install
```
**Set Up Environment Variables**
Create a new file named `.env` inside the `client` directory and add the following content:
```env
VITE_API_BASE_URL=
```
Replace the placeholder values with your actual API base URL. And in development if you are keeping your API PORT same as in this repository use `http://localhost:8000`
**Running the Client**
```bash
bun run dev
```
Open [http://localhost:5173](http://localhost:5173) in your browser to view the project.
Well client setup is done now it's time for our back-end or `api`
**API installation**
Install the back-end / api dependencies using `bun`:
```bash
cd api (maybe `cd ../api` if you are already inside client)
bun install
```
**Set Up Environment Variables**
Create a new file named `.env` inside the `api` directory and add the following content:
```env
DATABASE_URL=
FRONTEND_URL=
JWT_SECRET_KEY=
PORT=
NODE_ENV=
```
Replace the placeholder values with your actual database URL and make sure to fill the others too. If you are in unix based system type `openssl rand -hex 64` to generate a random complex string for `JWT_SECRET_KEY`. For example check `.env.example` file.
**Prisma setup and schema migration**
If your prefer a data-source provider other than `Sqlite` and generate a prisma schema from scratch run `bunx prisma init --datasource-provider ` change placeholder value with a data-source provider like `mysql` `postgres` etc and run the commands below.
If you are using Sqlite skip the previous step and paste the following command:
- Generate prisma client: `bunx prisma generate --datasource-provider sqlite`
- Migrate `bunx prisma migrate dev --name `
You have to run this migration command with every schema changes and if there is already a `migration` folder inside prisma directory delete that before running these commands.
To run prisma studio and visualize and edit you data in an interface just run : `bunx prisma studio`
Check prisma docs for more.
**Running the API**
```bash
bun run dev
```
You api is now running on `http://localhost:8000`.