Your weekly financial mirror - track income, expenses, and savings across all your financial roles.
- Node.js 18+
- npm or yarn
- SQLite (included with Prisma)
- Clone the repository:
git clone <repository-url>
cd skyledger- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env- Set up the database:
npx prisma generate
npx prisma db push
npx tsx prisma/seed.ts- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issuesnpm run type-check- Run TypeScript type checking
npx prisma generate- Generate Prisma clientnpx prisma db push- Push schema to databasenpx prisma studio- Open Prisma Studionpx tsx prisma/seed.ts- Seed database with initial data
src/
├── app/ # Next.js app router pages
├── components/ # React components
│ ├── ui/ # Reusable UI components
│ │ ├── role-icon.tsx # Centralized role icon component
│ │ └── __tests__/ # Component tests
│ ├── dashboard/ # Dashboard components
│ ├── charts/ # Chart components
│ └── layout/ # Layout components
├── lib/ # Utility functions
├── stores/ # Zustand state management
└── types/ # TypeScript type definitions
public/
├── icons/
│ └── roles/ # Role-specific PNG icons
│ ├── personal.png
│ ├── chama.png
│ ├── side-income.png
│ ├── sky-tech.png
│ └── all-roles.png
- Weekly-Centric Views: Default to current week financial snapshot
- Role Separation: Track Personal, Sky Tech, Chama, and Side Income separately
- Tuesday Chama Focus: Special reminders and progress tracking for weekly Ksh. 250 goal
- "Am I Moving Forward?": Weekly assessment answering your core financial question
- Offline-First: Works without internet connection with sync capabilities
- Mobile-Responsive: Optimized for mobile devices
- Dark Mode: Toggle between light and dark themes
- Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS
- UI Components: shadcn/ui, Radix UI
- State Management: Zustand with persistence
- Database: SQLite with Prisma ORM
- Charts: Recharts
- Offline: IndexedDB, Service Workers
- Icons: Lucide React
SkyLedger is built as a Progressive Web App (PWA) and can be installed on your mobile device:
- Open SkyLedger in your mobile browser
- Look for "Add to Home Screen" option
- Install the app for native-like experience
Create a .env file with:
DATABASE_URL="file:./dev.db"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NODE_ENV="development"The database includes:
- Financial Roles: Personal, Business, Chama, Side Income
- Categories: Role-specific income and expense categories
- Transactions: Individual financial transactions
- Chama Contributions: Weekly savings tracking
- Weekly Summaries: Aggregated weekly data
SkyLedger uses a centralized role icon system. See RoleIcon Usage Guide for detailed documentation.
Edit prisma/seed.ts to add custom categories for each role:
const personalCategories = [
{ name: 'Salary', type: 'INCOME' },
{ name: 'Food', type: 'EXPENSE' },
// Add more categories...
];Customize role colors in src/lib/role-colors.ts:
export const roleColors = {
personal: {
primary: '#3b82f6', // Blue
// ... other colors
},
// ... other roles
};- Push your code to GitHub
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically
- Build the application:
npm run build- Start the production server:
npm run start- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
If you encounter any issues:
- Check the Issues page
- Create a new issue with detailed description
- Include steps to reproduce the problem
SkyLedger - Progress measured weekly becomes growth measured yearly.