Why the Tech Stack Matters
Building a community platform for experienced professionals isn't the same as building yet another social media app. Our members expect reliability, speed, and thoughtful design. They don't tolerate crashes, slow loads, or confusing interfaces. They've spent decades working with enterprise-grade tools — and they notice when something is built with care versus when it's hacked together.
That raised the bar for every engineering decision we made.
TypeScript Everywhere
BayKaar is built entirely in TypeScript — from the API server to the web application to the mobile apps. This isn't just a preference; it's a strategy.
When your API types, your database queries, and your frontend components all speak the same language, entire categories of bugs disappear. A field renamed in the API contract immediately shows as an error in the web app and the mobile app. Type safety flows from the database schema to the user's screen.
Our shared types package defines the complete API contract — every request, every response, every entity. Both the web and mobile clients import from the same source of truth. When we add a field to a member profile, we change it in one place and the compiler tells us every location that needs updating.
The API Layer
The backend runs on Fastify — one of the fastest Node.js frameworks available. We chose Fastify over Express for its performance characteristics and its built-in schema validation. Every API endpoint validates its inputs before processing, which means bad data never reaches the business logic.
The API is organized into 24 route modules covering everything from authentication and member profiles to daily projects and community moderation. Behind those routes sit 42 service files — each one encapsulating a distinct domain of business logic.
Authentication flows through Supabase's JWT system. When a user signs in (email, Google, or Apple), they receive a JWT that the API verifies on every request. The auth plugin automatically creates member records for first-time users, so the signup experience is frictionless.
Supabase: More Than a Database
We use Supabase as our infrastructure layer, and it provides far more than PostgreSQL:
Row-Level Security (RLS) ensures that users can only access data they're authorized to see. Every table has RLS policies — members can read their own private data, community content is visible to all authenticated users, and admin operations are restricted to admin roles. The API uses a service role that bypasses RLS for server-side operations while direct client access respects all policies.
Realtime subscriptions power live features — when someone posts a comment in a book club discussion, other members see it appear instantly without refreshing. Direct messages update in real-time. Event RSVPs reflect immediately.
Storage handles profile photos with automatic image optimization. Members upload their avatars, and Supabase serves optimized versions at the right size for each context.
pgvector enables semantic search. We store vector embeddings of member profiles, discussion content, and job listings. This powers features like "find members with similar interests" and intelligent content recommendations.
AI That Actually Helps
BayKaar integrates Claude AI (from Anthropic) across multiple features, but always with a clear purpose — never AI for AI's sake.
Content Moderation: Every discussion post and comment passes through an AI moderation layer before publishing. The system checks for harmful content, spam, and off-topic material. This is critical for maintaining the respectful, professional tone our community expects.
Daily Projects: Every day, the platform delivers fresh DIY activities across five categories — home improvement, cooking, life admin, health & wellness, and staying sharp with tech. Each project includes step-by-step instructions, tools needed, difficulty level, and seasonal relevance. Members can save favorites, regenerate projects they've already tried, and share them with friends. It's purposeful daily engagement — not a feed to scroll through.
Book Club Curation: The AI generates reading recommendations based on community interests, produces discussion questions for each book, and creates summaries of key themes. It also powers the "Why We Recommend This" explanations that help members decide which books to pick up.
Wisdom Exchange Matching: When someone requests mentorship guidance, the AI helps match them with mentors whose experience is most relevant to their specific questions.
Cross-Platform Delivery
BayKaar runs on three platforms from a single codebase:
Web — Built with Next.js 14 using the App Router. Server-side rendering ensures fast initial loads and strong SEO. The web app uses Tailwind CSS for styling and React Query for server state management.
iOS & Android — Built with React Native and Expo. The mobile apps share the same API client and type definitions as the web app. A shared package of types and validators ensures that the mobile experience is identical in content and behavior to the web experience — only the UI differs (native components vs. HTML/CSS).
This monorepo architecture means a bug fix in the API client benefits all three platforms simultaneously. A new API endpoint is immediately available everywhere. And the shared type system catches integration issues at compile time, not in production.
The Database Architecture
Our PostgreSQL database has evolved through 42 migration files — a deliberate, incremental approach that tells the story of the platform's growth:
Starting with core extensions and member tables, then expanding to discussions, content, and events. Adding connection graphs for networking. Integrating vector embeddings for intelligent matching. Building the subscription tier system. Creating circles for interest-based groups. Implementing the gamification engine. Adding the wisdom exchange, busy minds activities, direct messaging, privacy controls, real-time support, and the daily projects pipeline.
Each migration is reversible. Each one was designed to be non-breaking. This disciplined approach means we can evolve the database schema confidently, knowing that every change has been carefully considered.
What's Next
We're continuing to push the boundaries of what a community platform can do for experienced professionals. Upcoming engineering work includes enhanced AI personalization, push notification infrastructure, and deeper analytics to help our members understand the impact of their community engagement.
The technology serves the mission: giving experienced professionals a platform worthy of their expertise.
Experience BayKaar at [baykaar.ai](https://baykaar.ai).