Skip to content

A fullstack app using nextjs to interact with LiteLLM Customer's API

ADORSYS-GIS/lite-llm-customer

Repository files navigation

Create T3 App

This is a T3 Stack project bootstrapped with create-t3-app.

Authentication

This project uses NextAuth.js for authentication. In a development environment, you can log in with the following credentials:

These credentials can be configured in the .env file.

What's next? How do I make an app with this?

We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.

If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our Discord and ask for help.

Learn More

To learn more about the T3 Stack, take a look at the following resources:

You can check out the create-t3-app GitHub repository — your feedback and contributions are welcome!

Server API

Budget Router

All admin-only interactions with LiteLLM budgets and customers are exposed via the tRPC router under budget.* procedures.

  • budget.listCustomers – lists customers by calling the LiteLLM customer list endpoint.
  • budget.getCustomerInfo – fetches customer details given { end_user_id }.
  • budget.createBudget – creates a budget with { budget_id, max_budget, budget_duration? }.
  • budget.assignBudget – assigns an existing budget via { user_id, budget_id }.
  • budget.listBudgets – lists budgets from LiteLLM.
  • budget.updateBudget – updates a budget's max_budget via { budget_id, max_budget }.

Every procedure:

  • Uses Zod validation for its inputs and, where relevant, outputs.
  • Requires an authenticated admin session enforced by the adminProcedure middleware in src/server/api/trpc.ts.
  • Returns normalized, user-safe error messages using TRPCError.

Refer to src/server/api/routers/budget.ts for implementation details.

How do I deploy this?

Follow our deployment guides for Vercel, Netlify and Docker for more information.

About

A fullstack app using nextjs to interact with LiteLLM Customer's API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •