Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mo-hassann/social-app

social media app with next js, hono, next-auth, react-query and drizzle orm
https://github.com/mo-hassann/social-app

authjs drizzle-orm honojs nextauth nextjs reactquery social-media social-media-app tanstack-react-query

Last synced: about 1 month ago
JSON representation

social media app with next js, hono, next-auth, react-query and drizzle orm

Awesome Lists containing this project

README

        

![alt text](https://github.com/mo-hassann/my-portfolio/blob/master/public/projects-imgs/social.png)
# Social Media App

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.

## πŸ“ƒ Table of Contents

- [✨ Features](#-features)
- [πŸ‘©β€πŸ’» Tech Stack](#-tech-stack)
- [πŸ’» Getting Started](#-getting-started)
- [πŸ› οΈ Installation](#-️installation)
- [πŸ“– Usage](#-usage)
- [πŸ’š Contributing](#-contributing)
- [πŸ“œ License](#-license)

## ✨ Features

- **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.

## πŸ‘©β€πŸ’» Tech Stack

- **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.

## πŸ’» Getting Started

To get a local copy of this project up and running, follow these steps.

### βœ” Prerequisites

- **Bun**: Ensure you have Bun installed. Follow the [official Bun installation guide](https://bun.sh/docs/installation).
- PostgreSQL (or another supported SQL database)

## πŸ› οΈ Installation

1. **Clone the repository:**

```bash
git clone https://github.com/mo-hassann/social-app.git
cd social-app
```

2. **Install dependencies:**

Using Bun:

```bash
bun install
```

3. **Set up environment variables:**

Create a `.env` file in the root directory and add the following variables:

```env
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
```

4. **Run database migrations:**

Ensure your database is running and then run:

```bash
bun run migrate
```

5. **Start the development server:**

```bash
bun dev
```

Open [http://localhost:3000](http://localhost:3000) to view the app in your browser.

## πŸ“– Usage

### βœ” Running the app

- **Development mode:** `bun dev`
- **Production mode:** `bun run build && bun start`

## πŸ’š Contributing

We welcome contributions to this project. Please follow these steps to contribute:

1. **Fork the repository.**
2. **Create a new branch** (`git checkout -b feature/your-feature-name`).
3. **Make your changes** and commit them (`git commit -m 'Add some feature'`).
4. **Push to the branch** (`git push origin feature/your-feature-name`).
5. **Open a pull request**.

Please make sure to update tests as appropriate.

## πŸ“œ License

Distributed under the MIT License. See [License](/LICENSE) for more information.