This is a Rails API project with some basic functionality to create and track invoices for clients
To get started with this project, you'll need to have the following software installed on your computer:
- Ruby 3.2.2
- Rails 7.0.4.3
Once those are installed, follow these steps to get up an running
- Clone this repository to your local machine:
git clone https://github.com/kctrlv/client-invoices.git
- Change into the project directory:
cd client-invoices
- Install the required gems:
bundle install
- Create the database:
rails db:create
- Run the database migrations:
rails db:migrate
- Start the server:
rails server
The API should now be running on http://localhost:3000
.
This API has a few important endpoints,
- GET
/api/v1/clients
will return a list of all the clients, and their nested invoices. - GET
/api/v1/clients/1
will return a the first client in the system - POST
/api/v1/clients/1/invoices
will create a new invoice for the given client - PUT
/api/v1/clients/1/invoices
will update the invoice, example body:{"invoice": {"status": "approved"}}