Node β’ Express β’ PostgreSQL β’ Passport β’ Tailwind
InnerCircles is a modern, community-based social platform where users can:
- Create and join private circles
- Post publicly or privately
- Reveal identities only within their circles
- Manage members with strict role-based permissions
It blends privacy, collaboration, and anonymity into a clean, simple user experience β making it a portfolio-grade full-stack project.
This project started as The Odin Project β Members Only assignment, but evolved into a full-featured, production-style web application with real authorization rules, role-based permissions, and relational data integrity.
π Live App:
π https://innercircles.devxsameer.me/
Hosted on Render + Neon PostgreSQL.
Note: First visit may take a few seconds if Render has spun down the instance.
See posts. Join circles. Speak freely.
In InnerCircles:
- Anyone can read public posts
- Only circle members can see who wrote them
- Each circle governs its own members, roles, and content
- Local auth using Passport.js
- Session-based login with PostgreSQL session store
- Bcrypt password hashing
- Rate-limited login endpoint (secure for production)
- Users can create their own circles
- Circle creator automatically becomes owner
- Role-based system:
- Owner β full control
- Admin β manage members & roles
- Member β post and interact
- Owners & admins can:
- Add members by username
- Promote/demote members
- Remove members (with strict rules)
- SQL triggers keep
members_countup to date automatically
- Create, edit, and delete posts inside circles
- Visibility types:
publicmembers_only
- Identity reveal is circle-based:
- Outside β Anonymous
- Inside β Real username
- Pagination for all feeds
- Policy-based permission system
- Loader middlewares (
loadPost,loadCircle,loadMembership) - Separation of concerns:
- Routes β Controllers β Services β Models
- Business rules enforced at:
- Service layer
- Database constraints
- PostgreSQL triggers
- Pagination for posts and circles
- Popular circles ranked by member count
- Indexed queries for efficient lookups
- Clean, responsive UI using Tailwind CSS
- Latest public posts
- Most popular circles
- Clean, Tailwind-powered design
Home Page
Circle Details Page
Manage Circle Page
All Posts Page
Create Post Page
src/
βββ routes/ # Route definitions
βββ controllers/ # Request handling & view rendering
βββ services/ # Business logic layer
βββ models/ # Database queries & data access
βββ policies/ # Permission & authorization rules
βββ middlewares/ # Auth, loaders, validators
βββ utils/ # Helpers, custom errors, pagination
βββ views/ # Handlebars templates
βββ database/ # PostgreSQL connection poolCore tables
userscirclescircle_membersposts
Notable design choices
members_countcached on circles via PostgreSQL triggers- Single owner enforced per circle
- Role constraints at DB level
- Automatic
edited_atupdates via trigger - Defensive foreign keys with cascading deletes
- Node.js
- Express 5
- PostgreSQL (Neon)
- Passport.js (local strategy)
- express-session
- bcrypt
- connect-pg-simple (session store)
- Handlebars
- Tailwind CSS
- pnpm
- nodemon
- dotenv
- Concurrently
The project includes realistic seed data:
- Multiple users
- Five circles with varied roles
- 20+ long-form posts
- Mixed visibility (public / members-only)
This makes the app immediately demo-ready.
git clone https://github.com/devxsameer/inner-circles.git
cd inner-circles
pnpm install
Create a .env file
DATABASE_URL=postgres://user:password@localhost:5432/inner_circles
SESSION_SECRET=supersecret
NODE_ENV=developmentRun the SQL schema and seed file:
psql $DATABASE_URL -f sql/init.sqlpnpm devApp runs at:
π http://localhost:6969
For demo/testing purposes only
(Passwords are intentionally identical in seed data)
| Username | Password |
|---|---|
| alice | password |
| bob | password |
| charlie | password |
This project demonstrates:
- β Real-world authorization logic
- β Clean Express.js architecture
- β Thoughtful database design
- β Security-first mindset
Planned enhancements include:
- π CSRF protection
- π OAuth login (Google / GitHub)
- π¬ Comment threads
- π Notifications system
- π Full REST / JSON API mode
This project is licensed under the ISC License.
Inspired by The Odin Project,
expanded with production-style architecture, strict permissions,
and real privacy rules.
Full-Stack Developer | Community-Driven Builder | Open-Source Contributor
Passionate about crafting clean, scalable applications and building community-based platforms.
Focused on JavaScript, Node.js, and modern full-stack development.
- π Portfolio: https://devxsameer.me
- πΌ LinkedIn: https://www.linkedin.com/in/devxsameer/
- π¦ Twitter (X): https://x.com/devxsameer
- π» GitHub: https://github.com/devxsameer
If you like this project:
It truly helps!




