An expense tracking application built with SvelteKit and Appwrite.
- User authentication (login/register)
- Add, edit, and delete expenses
- Categorize expenses
- View total expenses
- Responsive UI with TailwindCSS
- Node.js (v18 or later)
- pnpm
- Appwrite instance (self-hosted or cloud)
- Clone the repository:
git clone <repository-url>
cd expense-app
- Install dependencies:
pnpm install
-
Set up environment variables:
- Copy
.env.example
to.env
:cp .env.example .env
- Update the
.env
file with your Appwrite configuration:PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1 PUBLIC_APPWRITE_PROJECT_ID=your-project-id PUBLIC_APPWRITE_DATABASE_ID=expense-tracker PUBLIC_APPWRITE_COLLECTION_ID=expenses
- Copy
-
Create an Appwrite project and configure the following:
a. Create a new project in Appwrite Console
b. Create a new database with the ID specified in
PUBLIC_APPWRITE_DATABASE_ID
c. Create a new collection with the ID specified in
PUBLIC_APPWRITE_COLLECTION_ID
and add these attributes:userId
(String, required)amount
(Float, required)category
(Enum, required)- Elements: "food", "rent", "transportation", "entertainment", "shopping", "healthcare", "utilities", "education", "other"
description
(String, required)date
(DateTime, required)createdAt
(DateTime, required)updatedAt
(DateTime, required)
d. Configure collection permissions:
- Enable Document Security in Collection Settings
- At collection level, only set:
- Create:
["role:all"]
(allows all authenticated users to create documents)
- Create:
- Document-level permissions are set automatically when creating expenses
-
Start the development server:
pnpm dev
The application will be available at http://localhost:5173
To create a production build:
pnpm build
- SvelteKit
- Appwrite
- TailwindCSS
- TypeScript
- date-fns
MIT