This is a web application built with Next.js 13, Prisma, Next-Auth, Tanstack-Query, TypeScript, TailWind and Postgresql, that allows users to authenticate with Google Account, create posts, comment on posts, edit their posts, delete posts, and search for posts.
- Getting Started
- Project Structure
- Tech Stack
- Features
- Deployment
- Contributing
- License
To get started with the application, you will need to follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/your-username/PostUrThought.git
- Navigate to the project directory:
cd PostUrThought
- Install the dependencies:
npm install
- Create a new PostgreSQL database and add the database credentials to a new file called
.env:
DATABASE_URL="postgresql://user:password@localhost:5432/posturthought"
- Add these credential to a new file created in the folder called
.env.local
GOOGLE_CLIENT_ID = "your-google-client-id"
GOOGLE_CLIENT_SECRET = "your-google-client-secret"
NEXTAUTH_SECRET = TypeWhatEverYouWantInhere
NEXTAUTH_URL = http://localhost:3000/
- Run the migrations
npx prisma migrate dev
- Start the application
npm run dev
The project has the following directory structure:
.
├── app # React components used in the application, pages routing
├── pages # Next.js pages for the application
├── public # Public assets (images, fonts, etc.)
├── prisma # Prisma schema and migrations
├── node_modules # Dependencies installed
├── styles # Tailwind CSS styles
├── types # TypeScript type definitions
├── .env # Environment variables
├── .env.local # Environment local variables
├── .gitignore # Files and directories to be ignored by git
├── next.config.js # Next.js configuration
├── package.json # NPM dependencies and scripts
├── README.md # Project README file
├── tailwind.config.js # Tailwind CSS configuration
└── tsconfig.json # TypeScript configuration
- Next.js 13
- Prisma
- Next-Auth
- Tanstack-Query
- TypeScript
- Tailwind CSS
- PostgreSQL
- Toast
- Axios
This project was deployed on Vercel Platform from the creators of Next.js.
Check out Next.js deployment documentation for more details.
The application includes the following features:
- User Authentication with Google Account
- Creating a new posts
- Edit existing posts
- Delete existing posts
- Adding comments to your posts and other posts
- Search for posts
Contributions to the project are welcome. Before contributing, please read the contribution guidelines.
This project is licensed under the MIT License.