A full-stack application for managing digital assets with blockchain-like transaction tracking, built with Next.js 14, Fastify, tRPC, and PostgreSQL.
- 🔐 User Authentication (Register/Login)
- 💼 Asset Management (Create, View, Transfer)
- 📜 Transaction History
- 🔍 Advanced Filtering and Search
- 🔔 Notifications
- CSRF Protection
- Protected API Routes
- Session-based Authentication
- Toast Notifications
- Responsive Design
- Advanced Table Features
- Sorting
- Filtering
- Pagination
- Column Visibility Toggle
- Monorepo Structure with Turborepo
- Server-Side Rendering (SSR)
- Turborepo (Monorepo build system)
- npm (Package manager)
- TypeScript
- Next.js 14
- Tailwind CSS
- Shadcn/ui Components
- TanStack Query
- tRPC
- Fastify
- tRPC
- PostgreSQL (Supabase)
- Drizzle ORM
@assetmanager/db: Shared database package with Drizzle ORM schemas and migrations
assetmanager/
├── apps/
│ ├── frontend/ # Next.js frontend application
│ └── backend/ # Fastify backend server
├── shared/ # Shared packages
│ ├── db/ # Database schema, and utilities
├── turbo.json # Turborepo configuration
└── package.json # Root package.json for workspace
- Node.js 18+
- npm 10+
Create .env file in each directory:
# Frontend
NEXT_PUBLIC_API_ROUTE="http://localhost:3001"
# Backend
DATABASE_URL="postgresql://user:password@localhost:5432/assetmanager"- Clone the repository:
git clone https://github.com/khalilselyan/assetmanagerproject.git
cd assetmanagerproject- Install dependencies (using npm):
# from root folder
npm install- Set up the database:
cd shared/db
npm run db:pushRun the development servers:
# from root folder
npm run devThis will start all applications and watch shared packages for changes using Turborepo's pipeline:
- Frontend: http://localhost:3000
- Backend: http://localhost:3001
Build all applications and packages:
npm run buildTurborepo will automatically handle the build order and cache the outputs for faster subsequent builds.
Start the production servers:
npm run startThe application uses the following main tables:
user: User accounts and authenticationasset: Digital assets and ownershiptransaction: Asset transfer historynotification: System notifications
The backend exposes the following tRPC routes:
auth: User authentication and session managementasset: Asset CRUD operationstransaction: Transfer historynotification: User notifications