https://github.com/amaurycannesson/microsigma
Simplifies tracking my self-employed activity
https://github.com/amaurycannesson/microsigma
click drizzle-orm nextjs nivo-charts pydantic-ai sqlite
Last synced: 2 months ago
JSON representation
Simplifies tracking my self-employed activity
- Host: GitHub
- URL: https://github.com/amaurycannesson/microsigma
- Owner: amaurycannesson
- Created: 2024-12-14T15:15:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-20T13:45:02.000Z (over 1 year ago)
- Last Synced: 2025-05-18T20:07:38.542Z (about 1 year ago)
- Topics: click, drizzle-orm, nextjs, nivo-charts, pydantic-ai, sqlite
- Language: TypeScript
- Homepage:
- Size: 251 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📊 MicroSigma
Simplifies tracking my self-employed activity (Micro-Entreprise). It allows me to:
- Log my workdays
- Track my revenue
- Calculate social contributions and income taxes
- Helps with invoicing and revenue declaration

### 🤖 AI powered
Don't need it, but it's trendy (and I wanted to play with PydanticAI)
```bash
❯ poetry run ai "how much I've earned since the beginning of the month"
sql_query="SELECT SUM(rate * real) AS total_earned FROM activity WHERE date >= DATE('2024-12-01') AND date <= DATE('2024-12-15')"
result='You have earned a total of 5500 euros since the beginning of the month.'
```
```bash
❯ poetry run ai "log a workday for yesterday"
Please provide the rate for the workday on 2024-12-14.: 500
sql_query="INSERT INTO activity (date, paid_at, rate, estimated, real) VALUES (DATE('now','-1 day'), DATE('now','-1 day'), 500, 1.0, 1.0)"
result='A workday has been successfully logged for 2024-12-14.'
```
```bash
❯ poetry run ai "delete all activity for the current month"
sql_query="DELETE FROM activity WHERE date >= DATE('now', 'start of month') AND date < DATE('now', 'start of month', '+1 month')"
result='15 rows deleted.'
```
## Getting Started
### Run the app
```bash
npm install
npm run dev
```
Open [http://localhost:8888](http://localhost:8888)
### Run the AI agent
```bash
cd src/ai
poetry install
OPENAI_API_KEY=xxx poetry run ai "prompt"
```
## Configuration
`./src/config.ts` _(may not be up to date)_
```typescript
{
socialContributionRate: 0.22,
acreRate: 0.11,
acreStartDate: dayjs('2024-06-01'),
acreEndDate: dayjs('2025-03-31'),
incomeTaxRate: 0.18,
taxAbatement: 0.34,
activityStartDate: dayjs('2024-06-01'),
incomeLimit: 77700,
vatLowerLimit: 36800,
vatUpperimit: 39100,
vatStartDate: dayjs('2024-12-01'),
}
```
## TODO
- Generate activity report PDF (CRA)
- Notify when approaching the VAT threshold
- Update the configuration file directly from the interface