Modern electronic invoicing platform for Colombia, built with Next.js, Elysia, Better Auth, and Drizzle ORM.
Powered by Factus, the electronic invoicing provider used by Akina for document issuance and validation workflows.
Akina is a full-stack invoicing application focused on the Colombian market. It streamlines the creation and management of invoices, support documents, customers, providers, and products while integrating with Factus for electronic document workflows and DIAN-facing validation flows.
The project combines:
- a polished Next.js App Router frontend,
- a typed API layer powered by Elysia,
- a PostgreSQL data layer with Drizzle ORM,
- secure auth/session flows with Better Auth,
- transactional email delivery through Resend.
- Invoice lifecycle management with creation, listing, details, and PDF download.
- Support documents flow for purchases to non-obligated invoice issuers.
- Credit notes and adjustment notes with dedicated forms and export flows.
- Customer, provider, and product master data management.
- Dashboard analytics (monthly revenue, invoice status, KPI summary, top customers).
- Factus credential management per user plus shared sandbox fallback.
- Authentication flows: register, login, email verification, password reset, and 2FA plugin support.
- Server-side environment validation and encryption key handling for sensitive fields.
- Next.js 16 (App Router)
- React 19
- Tailwind CSS v4
- Motion for UI animation
- TanStack Query for server-state management
- TanStack Table for advanced data tables
- Recharts for dashboard charting
- shadcn/ui component patterns
- Elysia for typed API modules
- Better Auth for authentication and session management
- Drizzle ORM + drizzle-kit
- Neon Serverless Postgres compatible PostgreSQL driver
- Zod and @t3-oss/env-nextjs for runtime env validation
- Resend + React Email for transactional email
- Factus JS for Factus API integration
- Biome for linting/checking
- Prettier for formatting
- TypeScript
- Bun compatible scripts (non-Windows flow)
app/ Next.js App Router pages and layouts
components/ Reusable UI + domain components
elysia/ API modules, services, and typed route layer
db/ Drizzle schema and migrations
lib/ Shared utilities (auth, env, crypto, Factus client)
hooks/ Reusable application hooks (API, state, and UI logic)
emails/ Transactional email templates (React Email)
public/ Static assets
Copy .env.example to .env.local and fill in your values.
cp .env.example .env.localThe required variables are documented in .env.example:
NEXT_PUBLIC_BASE_URLDATABASE_URLBETTER_AUTH_SECRETRESEND_API_KEYRESEND_FROMFACTUS_USERNAMEFACTUS_PASSWORDFACTUS_CLIENT_IDFACTUS_CLIENT_SECRETENCRYPTION_KEY(64-char hex string / 32 bytes)
bun installcp .env.example .env.localbun devOpen http://localhost:3000.
bun dev- starts the development server.bun build- builds the production app.bun start- serves the production build.bun lint- runs Biome checks.bun lint:fix- runs Biome with auto-fix.bun format- formats code with Prettier.bun email- runs React Email preview server on port 3001.
- Elysia app is mounted under
/apiand exposed throughapp/api/[[...slugs]]/route.ts. - Better Auth is configured server-side and integrated with Drizzle-backed persistence.
- Factus has a shared sandbox fallback client when users do not have active credentials.
- Sensitive provider/client credentials are encrypted before persistence and decrypted only for runtime use.
bun build
bun startIf you want to contribute, please open an issue first to discuss major changes and implementation approach.