- Status: Draft
- Last Updated: 2025-12-25
Set up a local development environment for Oar to contribute to the project or test features. By the end of this guide, you will have a running instance of Oar connected to a local SQLite database with sample data.
Ensure you have the following installed on your machine:
- Node.js 24: The project requires Node.js 24 (see
.nvmrc). - npm: Use npm as the primary package manager.
- Git: For version control and cloning the repository.
- OpenSSL: Required to generate encryption keys for Next.js Server Actions.
Clone the project to your local machine and navigate into the directory:
git clone https://github.com/sergeyklay/oar.git
cd oarUse npm to install the required packages:
npm installCreate a local environment file by copying the provided example:
cp .env.example .envOpen .env and generate a secure encryption key for Server Actions:
# On Linux/macOS
openssl rand -base64 32Copy the output and paste it into the NEXT_SERVER_ACTIONS_ENCRYPTION_KEY
field in your .env file.
Oar uses SQLite with Drizzle ORM. Push the schema to your local database file:
npm run db:pushThis creates the SQLite database file at the path specified by
DATABASE_URL (default: ./data/oar.db).
To populate the application with categories, tags, bills, and transactions for testing, run the seed script:
npm run db:seedThis seeds predefined bill categories (required for bill creation) and generates sample bills with transaction history.
Launch the Next.js development server:
npm run devThe application uses the following environment variables:
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
Path to the SQLite database file. | ./data/oar.db |
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY |
Key for Server Actions. | Required |
OAR_MEMORY_LIMIT |
Docker memory limit. | 128MiB |
OAR_MEMORY_LIMIT is used only for Docker deployment.
For more see Local Docker Deployment.
How do I know it worked?
-
Open your browser and navigate to
http://localhost:3000. -
You should see the Oar dashboard.
-
If you ran the seed script, you should see sample bills and recent transactions.
-
Run the test suite to ensure everything is functioning correctly:
npm test
If you see errors related to syntax or missing APIs, verify your Node.js version:
node -vIf you use nvm, run nvm use in the root directory to switch to the
version specified in .nvmrc.
If the application fails to start or shows database errors, ensure the
data/ directory exists or that the path in DATABASE_URL is writable.
If you encounter issues when submitting forms, ensure
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY is set correctly in your .env file
and that you restarted the development server after adding it.
To learn about Local Docker deployment, see Local Docker Deployment.
- Local Docker Deployment - Running Oar locally with Docker