Welcome to the Spendaro API! This is the backend service for the Spendaro finance application, which helps users budget using the "Give Every Dollar a Job" methodology.
The Spendaro API is a RESTful service designed to manage financial data for the Spendaro application. It allows users to create budgets, track expenses, and allocate funds to specific categories.
- User authentication and authorization
- Budget creation and management
- Expense tracking
- Category management
- Reporting and analytics
Note
The API adheres to the OpenAPI Specification, automatically generating documentation that is rendered using Scalar for an interactive, user-friendly experience.
Go to http://localhost:8010/docs
and you will be able to understand all the APIs
and how to consume them.
To get started with the Spendaro API, follow these steps:
-
Clone the repository:
git clone https://github.com/tannerbarcelos/spendaro-api.git
-
Navigate to the project directory:
cd spendaro-api
-
Install dependencies:
pnpm install
-
Set up environment variables: Create a
.env
file in the root of the project and add the following environment variables:NODE_ENV= DB_HOST= DB_USER= DB_PASSWORD= DB_NAME= JWT_SECRET= <generate using `openssl rand -base64 32`> COOKIE_SECRET= <generate using `openssl rand -base64 32`>
Note: Replace the values with your own database connection details.
- You can use a local database or a cloud-hosted database like Supabase.
- If you're using Supabase, you can find your database connection details in the "Settings" tab of your Supabase project.
- Docker support is coming soon so this can be automated
-
Setup the database for local development
Note
Make sure you have the following completed:
- environment variables set up
- database connection details are correct
- database is running (locally or cloud-hosted - just make sure the connection details are correct)
- make utility is installed (if not, you can install it using
npm install -g make-cli
)
make setup-db
This will generate a migration script in the migrations
folder, run the migration against the database, and seed the database with some initial data.
- Start the server:
pnpm dev
- Test the API: Import the Postman collection into Postman to test the API endpoints and explore the available features.
Docker support is coming soon!
You can head to the api documentation to understand all the APIs and how to consume them.
Run the server and navigate to
http://localhost:8010/docs
to view the API documentation. (Make sure the server is running before you access the documentation.)You can also import the Postman collection into Postman to test the API endpoints and explore the available features.
WIP: Deployment of API documentation to a public URL.
This project is licensed under the MIT License. See the LICENSE file for details.