Skip to content

GeraltWang/next-finance

Repository files navigation

Next Finance

next-finance logo

This is a Next.js project bootstrapped with create-next-app.

Getting Started 🚀

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Tech Stack 🛠️

Apple Shortcuts

You can use the following shortcut to quickly add expenses to your account. Before using the shortcut, you need to create a PAT token in the settings page then copy and paste it in the shortcut dictionary Authorization key.

Exposed API Documentation

Endpoints

  • All endpoints are prefixed with /api/expose.
  • All endpoints require a valid Bearer <your-pat-token>token in theAuthorization header.
  • You can generate PAT token in settings page.

1. Get all accounts

  • Endpoint: /api/expose/accounts

  • Method: GET

  • Request Headers:

    • Authorization: Bearer PAT Token
  • Response:

    {
    	"data": [
    		{
    			"id": "string",
    			"name": "string"
    		}
    	]
    }

2. Get all categories

  • Endpoint: /api/expose/categories

  • Method: GET

  • Request Headers:

    • Authorization: Bearer PAT Token
  • Response:

    {
    	"data": [
    		{
    			"id": "string",
    			"name": "string"
    		}
    	]
    }

3. Add a new expense

  • Endpoint: /api/expose/add-expense

  • Method: POST

  • Request Headers:

    • Authorization: Bearer PAT Token
  • Request Body:

    {
    	"accountName": "string",
    	"categoryName": "string",
    	"amount": "number",
    	"payee": "string"
    }

Learn More 📚

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel 🚀

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.