[!WARNING] There is currently no stable release of Polar available.
Expect breaking changes, incomplete features, and frequent updates.
- π Share & Engage: Create posts, leave comments, and show appreciation with likes
- π€ Profile Customization: Personalize your profile to express yourself
- π Discover People: Find and connect with new friends and interesting people
- π¬ Real-time Chat: Communicate instantly with your friends
- π Location-based Discovery: Find people nearby and potentially find your next date!
- ποΈ Modern Architecture: Built with TypeScript, tRPC, Vue.js, and Express.js
This is a monorepo built with modern tools and best practices:
- Frontend: Vue.js 3 + TypeScript + Vite + Pinia
- Backend: Node.js + Express.js + TypeScript + tRPC
- Database: MariaDB + Prisma ORM
- Caching: Redis
- Authentication: Better Auth + JWT
- File Storage: ImageKit
- Monorepo: Turborepo + pnpm workspaces
- Type Safety: Full end-to-end type safety with tRPC
- Node.js: >= 20.0.0
- pnpm: >= 10.0.0
- MariaDB: Latest stable version
- Redis: Latest stable version
-
Clone the repository
git clone https://github.com/UsboKirishima/polar.git cd polar -
Install dependencies
pnpm install
-
Set up environment variables
# Copy example environment files cp apps/backend/.env.example apps/backend/.env cp apps/frontend/.env.example apps/frontend/.env # Edit the files with your configuration
-
Set up the database
# Generate Prisma client pnpm db:generate # Run database migrations pnpm db:migrate
-
Start development servers
# Start all services in development mode pnpm dev # Or start individual services pnpm dev --filter=@polar/backend pnpm dev --filter=@polar/frontend
- TypeScript: Strict mode enabled with comprehensive type checking
- ESLint: Antfu's ESLint config with custom rules
- Prettier: Consistent code formatting
- Conventional Commits: Follow conventional commit format
# Database
DATABASE_URL="mariadb://user:password@localhost:5432/polar"
# Redis
REDIS_URL="redis://localhost:6379"
# Authentication
JWT_SECRET="your-jwt-secret"
BCRYPT_ROUNDS=12
# ImageKit (for file uploads)
IMAGEKIT_PUBLIC_KEY="your-public-key"
IMAGEKIT_PRIVATE_KEY="your-private-key"
IMAGEKIT_URL_ENDPOINT="your-url-endpoint"
# Server
PORT=3000
NODE_ENV="development"# API Configuration
VITE_API_URL="http://localhost:3000"
VITE_WS_URL="ws://localhost:3000"
# Environment
NODE_ENV="development"The database schema is defined in packages/db/src/schema.prisma. Key entities:
- User: User accounts and profiles
- Post: User posts and content
- Comment: Comments on posts
- Like: Post and comment likes
- Chat: Direct messaging
- Location: User location data
# Build applications (packages are consumed as-is)
pnpm build
# Build for production with optimizations
NODE_ENV=production pnpm build# Build Docker images
docker-compose build
# Start services
docker-compose up -d# Staging
pnpm build --filter=@polar/backend
pnpm build --filter=@polar/frontend
# Production
NODE_ENV=production pnpm build --filter=@polar/backend
NODE_ENV=production pnpm build --filter=@polar/frontendWe welcome contributions! Please follow these guidelines:
- Fork the repository and create your feature branch
- Follow the code standards and run linting/formatting
- Write tests for new functionality
- Update documentation as needed
- Submit a pull request with a clear description
- Follow the Quick Start guide above
- Install development dependencies:
pnpm install - Set up pre-commit hooks:
pnpm prepare - Make your changes and ensure all tests pass:
pnpm test
Working with Packages:
- Changes to packages are immediately visible (no build step!)
- Type checking works across the entire monorepo
- Just save your
.tsfiles and restart the consuming application - Use
pnpm type-checkto verify types across all packages
- API Documentation: See
apps/backend/docs/ - Component Documentation: See
apps/frontend/docs/ - Package Documentation: Each package has its own README
- Architecture Decision Records: See
docs/adr/
- TypeScript errors: Run
pnpm type-checkto identify issues across packages - Module resolution issues: Clear node_modules and reinstall (
pnpm clean && pnpm install) - Database connection: Verify MariaDB is running and connection string is correct
- Redis connection: Ensure Redis server is running
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Check package-specific READMEs
This project is licensed under the Polar Restricted Use and Attribution License (P-RUAL) - see the LICENSE file for details.
Davide Usberti
- Website: usbo.tech
- Email: [email protected]
- GitHub: @UsboKirishima
β Star this project if you find it helpful!

