Skip to content

Repository files navigation

nivesh-bot

An AI investing assistant, built as a Bun + Turborepo monorepo. The frontend is a React SPA (Vite + TanStack Router) and the backend is a Hono API that also runs background workers and cron jobs.

Stack

  • Client — React 19, Vite, TanStack Router + Query, Tailwind, shadcn/ui, Vercel AI SDK
  • Server — Bun, Hono, Drizzle ORM, Better Auth, BullMQ + Redis, MinIO/S3
  • Tooling — TypeScript, Turbo, ESLint, Prettier

Layout

apps/
  client/    React frontend (@repo/client)
  server/    Hono API, workers, cron (@repo/server)
packages/
  config/    Shared ESLint/Prettier config
docker/      Compose file for local services

Getting started

You'll need Bun 1.3.11 and a PostgreSQL database.

bun install

# Set up env files and fill in the values
cp apps/client/.env.example apps/client/.env
cp apps/server/.env.example apps/server/.env

# Start Redis, MinIO, etc.
docker compose -f docker/docker-compose.yaml up -d

bun run db:migrate
bun run dev

The client runs on http://localhost:5173 and the server on http://localhost:3000.

The .env.example files have sensible defaults that match the Docker Compose services. See the app READMEs (client, server) for the full list of variables.

Common scripts

Run from the repo root:

Script What it does
bun run dev Start client and server in watch mode
bun run build Build all packages
bun run lint Lint everything
bun run format Format everything
bun run typecheck Type-check all packages
bun run db:generate Generate Drizzle migrations
bun run db:migrate Apply Drizzle migrations

To run a single package, use --filter, e.g. bun run --filter=@repo/server dev.

Docker

Each app has a production Dockerfile, and both must be built from the repo root so the workspace context is available:

# Client (static SPA, port 80) — API URL is baked in at build time
docker build -f apps/client/docker/Dockerfile \
  --build-arg VITE_API_BASE_URL=http://localhost:3000 \
  -t nivesh-bot-client .

# Server (Bun API, port 3000)
docker build -f apps/server/docker/Dockerfile -t nivesh-bot-server .

The server reads its config from the environment at runtime:

docker run --rm -p 3000:3000 --env-file apps/server/.env nivesh-bot-server
docker run --rm -p 8080:80 nivesh-bot-client

The server can run as API-only, worker-only, or cron-only via the ENABLE_HTTP_SERVER, ENABLE_QUEUE_WORKERS, and ENABLE_CRON flags — see the server README.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages