Skip to content

arkits/historian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Historian

A full-stack web application built with Bun, React, tRPC, and PostgreSQL.

Tech Stack

  • Runtime: Bun - Fast all-in-one JavaScript runtime
  • Frontend: React 19 with TypeScript
  • Backend: tRPC for type-safe APIs
  • Database: PostgreSQL with Drizzle ORM
  • Authentication: better-auth
  • Styling: Tailwind CSS with shadcn/ui components
  • Testing: Vitest
  • Database Migrations: Drizzle migrations

Prerequisites

  • Bun installed
  • PostgreSQL database (local or hosted)

Getting Started

Installation

bun install

Environment Variables

Create a .env file based on .env.example (copy and modify):

cp .env.example .env

Configure the following variables:

  • DATABASE_URL - PostgreSQL connection string
  • AUTH_SECRET - Secret key for authentication

Database Setup

Run migrations to set up the database schema:

bun run migrate

Development

Start the development server with hot reload:

bun dev

The application will be available at http://localhost:3000

Production

Build and start the production server:

bun run build
bun start

Testing

Run tests with Vitest:

bun test

Project Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ client/           # tRPC client configuration
β”‚   β”œβ”€β”€ components/       # React components (shadcn/ui)
β”‚   β”œβ”€β”€ lib/              # Utility functions and database
β”‚   β”œβ”€β”€ pages/            # Page components
β”‚   β”œβ”€β”€ server/           # tRPC router and server setup
β”‚   β”œβ”€β”€ App.tsx           # Main App component
β”‚   β”œβ”€β”€ frontend.tsx      # Frontend entry point
β”‚   └── index.ts          # Application entry point
β”œβ”€β”€ drizzle/
β”‚   β”œβ”€β”€ meta/             # Drizzle migration metadata
β”‚   └── 0000_heavy_venom.sql  # Migration files
β”œβ”€β”€ tests/                # Vitest test files
β”œβ”€β”€ build.ts              # Build script
β”œβ”€β”€ migrate.ts            # Database migration script
β”œβ”€β”€ drizzle.config.ts     # Drizzle configuration
└── bunfig.toml           # Bun configuration

Docker

Build and run with Docker:

docker build -t historian .
docker run -p 3000:3000 historian

Available Scripts

Command Description
bun dev Start development server
bun start Start production server
bun run build Build the application
bun test Run tests
bun run migrate Run database migrations
bun run db:reset Reset database schema

License

MIT

About

πŸ•΅οΈ Historian Never Forgets

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •