Social Media Platform with Islamic Values Foundation
SalamHub is a next-generation social media platform that combines the best features from successful platforms while emphasizing free speech and Islamic moral values. Open to everyone worldwide, the platform provides a safe, ethical, and engaging environment rooted in the Islamic principle of "Salam" (peace).
- 📝 Posts & Threads - Share your thoughts with text, images, and videos
- 🔄 Feed System - Chronological and algorithmic feed options
- 💬 Comments & Replies - Engage in meaningful discussions
- ❤️ Reactions - Express yourself with Islamic-appropriate reactions
- 👥 Groups - Create and join communities around shared interests
- 🔒 End-to-End Encrypted DMs - Private conversations with security
- 🌍 Arabic-First - Built with Arabic as the default language
- 🛡️ Content Moderation - Strict enforcement with community oversight
- Node.js 18+
- PostgreSQL 15+
- npm or yarn
-
Clone the repository
git clone https://github.com/yourusername/salamhub.git cd salamhub -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.envwith your configuration. -
Set up the database
# Generate Prisma client npm run db:generate # Push schema to database npm run db:push # Or run migrations npm run db:migrate
-
Start the development server
npm run dev
-
Open http://localhost:3000 in your browser.
salamhub/
├── components/ # React components
│ ├── Layout/ # Layout components (Sidebar, FollowBar)
│ ├── Button.tsx # Reusable button component
│ └── Header.tsx # Page header component
├── pages/ # Next.js pages
│ ├── api/ # API routes
│ │ └── v1/ # Versioned API endpoints
│ ├── _app.tsx # App wrapper
│ └── index.tsx # Home page
├── lib/ # Utility libraries
│ ├── prisma.ts # Prisma client singleton
│ └── auth.ts # Authentication utilities
├── prisma/ # Database schema
│ └── schema.prisma # Prisma schema definition
├── styles/ # Global styles
├── public/ # Static assets
└── plans/ # Planning documents
├── social-platform-proposal.md
├── database-schema.md
└── api-architecture.md
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/auth/register |
Register new user |
| POST | /api/v1/auth/login |
Login user |
| POST | /api/v1/auth/logout |
Logout user |
| POST | /api/v1/auth/refresh |
Refresh access token |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/users/me |
Get current user |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/posts |
Create new post |
| GET | /api/v1/feed |
Get feed |
| Category | Technology |
|---|---|
| Framework | Next.js 14 |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Database | PostgreSQL |
| ORM | Prisma |
| Authentication | JWT |
| State Management | Zustand |
This project is licensed under the MIT License.
Contributions are welcome! Please read our contributing guidelines before submitting a pull request.
For questions or support, please open an issue on GitHub.
SalamHub - Building a better social media experience, together. 🕊️