Skip to content

bedtime-coders/bepstack

Repository files navigation

Bepstack

Tests Status Discord License Bun ElysiaJS Prisma Biome Scalar Star

Bun + ElysiaJS + Prisma Stack

What is this?

Bepstack is a collection of bleeding-edge technologies to build modern web applications.

Including:

This project demonstrates the stack in action via a RealWorld example.

Environment Configuration

Production and shared environment variables are defined in src/core/env.ts.

Test-specific environment variables are now defined in src/core/test-env.ts and are only used by test scripts and test runners. This keeps test configuration isolated from production config.

Development

  1. Install dependencies

    bun install
  2. Copy .env.example to .env and fill in the values

    cp .env.example .env
  3. Start the database server

    bun db:start
  4. Push the database schema to the database

    bun db:push
  5. Start the development server

    bun dev
  6. (Optional) Start the database studio

    bun db:studio

Testing

Run all tests:

bun run test # Not `bun test`!

Or run different test suites individually:

bun test:api # Run the API tests
bun test:unit # Run the unit tests

Tip

To create test-specific environment configuration, create a .env.test file. You may use .env.test.example as a template:

cp .env.test.example .env.test

Building for production

Tip

See more info in ElysiaJS's building for production guide.

  1. Build the app

    bun run build # not `bun build`!
  2. Run the production server (preview)

    bun preview

Contributing

See CONTRIBUTING.md for more information, including how to set up your development environment.