Skip to main content

Prerequisites

Before installing Ceboelha API, ensure you have the following installed on your system:
Ceboelha API is built with Elysia and Bun, providing exceptional performance and developer experience.

Installation Steps

1

Clone the repository

Clone the Ceboelha API repository to your local machine:
git clone https://github.com/yourusername/ceboelha-api.git
cd ceboelha-api
2

Install dependencies

Install the required dependencies using Bun:
bun install
This will install all dependencies listed in package.json, including:
  • Elysia - Fast and ergonomic web framework for Bun
  • Mongoose - MongoDB object modeling
  • @elysiajs/jwt - JWT authentication
  • @elysiajs/cors - CORS support
  • @elysiajs/swagger - API documentation
  • bcrypt - Password hashing
3

Set up environment variables

Copy the example environment file and configure it:
cp .env.example .env
Never commit your .env file to version control! It contains sensitive secrets.
See the Configuration page for detailed environment variable setup.
4

Set up the database

Ensure MongoDB is running on your system. Then set up the database:
# Test MongoDB connection
bun run test:db

# Seed the database with initial data (optional)
bun run db:seed
For detailed database setup instructions, see Database Setup.
5

Start the development server

Start the API in development mode with hot reload:
bun run dev
The server will start at http://localhost:3333 (or the port specified in your .env file).

Verify Installation

Once the server is running, you should see output similar to:
🧅 Ceboelha API starting...
📍 Environment: development
✅ MongoDB connected: localhost
🚀 Server running at http://localhost:3333
📚 Swagger docs at http://localhost:3333/docs
Visit http://localhost:3333/docs in your browser to access the interactive API documentation.

Available Scripts

The following npm scripts are available:
ScriptDescription
bun run devStart development server with hot reload
bun run startStart production server
bun testRun tests
bun run test:dbTest MongoDB connection
bun run db:seedSeed database with initial data
bun run db:seed-foodsSeed FODMAP foods data
bun run lintLint code with Biome
bun run formatFormat code with Biome

Next Steps

Configuration

Configure environment variables and application settings

Database Setup

Set up MongoDB and understand the data models

Build docs developers (and LLMs) love