A modern social media application built using Next.js, Hono, Drizzle ORM, and React Query. This app allows users to connect, share posts, and engage with a community.
- User Authentication: Secure sign-up and login with Auth JS.
- User Profiles: Customizable profiles with avatars and bio.
- Posts: Create, edit, and delete posts.
- Comments: Comment on posts and engage with the community.
- Real-time Notifications: Stay updated with real-time notifications for likes, comments, and new followers.
- Search: Find users and posts using the search feature.
- Next.js: A React framework for building server-side rendering and static web applications.
- Auth.js: Free and open source Authentication for the Web.
- Hono: A lightweight web framework for building server-side applications with TypeScript.
- Drizzle ORM: TypeScript-first ORM for type-safe database access.
- React Query: Data-fetching library for managing server-state in React applications.
- Bun: A fast JavaScript runtime that includes a package manager, task runner, and more.
To get a local copy of this project up and running, follow these steps.
- Bun: Ensure you have Bun installed. Follow the official Bun installation guide.
- PostgreSQL (or another supported SQL database)
-
Clone the repository:
git clone https://github.com/mo-hassann/social-app.git cd social-app
-
Install dependencies:
Using Bun:
bun install
-
Set up environment variables:
Create a
.env
file in the root directory and add the following variables:DATABASE_URL=your_database_url DATABASE_SECRET=your_database_secret DRIZZLE_DATABASE_URL=your_database_url_for_drizzle AUTH_SECRET=any_random_secret NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Run database migrations:
Ensure your database is running and then run:
bun run migrate
-
Start the development server:
bun dev
Open http://localhost:3000 to view the app in your browser.
- Development mode:
bun dev
- Production mode:
bun run build && bun start
We welcome contributions to this project. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Make your changes and commit them (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Open a pull request.
Please make sure to update tests as appropriate.
Distributed under the MIT License. See License for more information.