Splidot is a user-friendly payment manager designed to help you split expenses among friends effortlessly. With Splidot, you can create groups, add expenses, and have the app calculate equal splits for everyone. The app ensures transparency and ease of managing shared costs.
To run Splidot locally, you need:
- Node.js (v18+ recommended)
- A PostgreSQL database (a free Neon database works out of the box)
- A package manager like npm or yarn
- Google Chrome installed (only needed to run the end-to-end tests — see Testing)
-
Clone the repository:
git clone 'https://github.com/Rov95/splidot.git' cd splidot
-
Install dependencies for both the frontend and backend:
# Install frontend dependencies cd client npm install # Install backend dependencies cd ../server npm install
-
Configure the environment variables:
- For the backend, create a
.envfile in theserverdirectory (seeserver/.env.example):# Postgres connection string (e.g. from Neon) DATABASE_URL=postgresql://<user>:<password>@<host>/<dbname>?sslmode=require # Secret used to sign JWTs SECRET_KEY=<a-long-random-string>
- For the backend, create a
-
Start the backend server (TypeScript, runs with hot reload):
cd server npm run devThe API listens on
http://localhost:3000. -
Start the frontend development server:
cd ../client npm run dev -
Open your browser and navigate to
http://localhost:5173to use Splidot.
| Command | Description |
|---|---|
npm run dev |
Run the server in watch mode with tsx |
npm run build |
Compile TypeScript to dist/ |
npm start |
Run the compiled server from dist/ |
npm test |
Run the Vitest test suite once |
npm run test:watch |
Run the Vitest test suite in watch mode |
| Command | Description |
|---|---|
npm run dev |
Run the Vite dev server with hot reload |
npm run typecheck |
Type-check with tsc --noEmit |
npm run build |
Type-check, then build for production into dist/ |
npm run lint |
Run ESLint |
npm run preview |
Preview the production build locally |
npm test |
Run the Vitest test suite once |
npm run test:watch |
Run the Vitest test suite in watch mode |
Splidot has three layers of automated tests:
| Layer | Location | Framework | What it covers |
|---|---|---|---|
| Backend unit/integration | server/tests |
Vitest + Supertest | Route handlers (/users, /groups, /expenses, /categories) against an in-memory SQLite database, plus the errorMessage util and authMiddleware |
| Frontend unit/component | client/src/**/*.test.tsx |
Vitest + React Testing Library | Forms, dashboard components, and the pure calculateSettlements splitting algorithm, with services mocked |
| End-to-end | e2e/ (repo root) |
Playwright | Full golden path in a real browser against the real dev servers and Neon database: sign up → sign in → create group → add expense → settle up → log out |
Backend tests never touch the real Neon database — server/src/config/database.ts switches to an in-memory SQLite instance whenever NODE_ENV=test (set automatically by Vitest). The E2E suite does use the real Neon database (via the dev servers) but cleans up everything it creates before and after each run.
Run each suite from its own directory:
cd server && npm test # backend tests
cd client && npm test # frontend tests
npm run test:e2e # from the repo root — starts both dev servers automaticallyThe E2E suite uses your system-installed Google Chrome (channel: 'chrome' in playwright.config.ts) instead of downloading a bundled Chromium, so no browser download is required.
- Language: TypeScript (strict mode)
- Framework: React with Vite for fast development and build performance
- Styling: CSS for responsive and modern design
- Language: TypeScript (strict mode) compiled for Node.js
- Framework: Express for building the server and API
- Database: PostgreSQL (hosted on Neon) for robust and scalable data management
- ORM: Sequelize with typed models for managing database models and queries
- Authentication: Stateless JWT (Bearer token, 90-day expiry) stored in
localStorageon the client
Splidot was developed by:
- Andres Menco - Full-stack development
Contributions, bug reports, and feature requests are welcome! Feel free to open an issue or submit a pull request on GitHub.
