The server & client for my Pretendster Social Media app.
Pretendster has the following functionalities:
- Customize Profile Bio and Profile Picture
- Search Users on the App
- Follow and Unfollow Users
- See posts from you and your followed users
- Make your own posts. Optionally add an image.
- Create and delete comments to posts
- Like posts made by users
- And more in the future (hopefully!)...
Live URLs
Previews
Base URL => /api/v1
Description | Method | Endpoint |
---|---|---|
Session | GET | /auth/session |
Register | POST | /auth/register |
Login | POST | /auth/login |
Logout | POST | /auth/logout |
Description | Method | Endpoint |
---|---|---|
All Users | GET | /user/all |
User Suggestions | GET | /user/suggestions |
Search Users | GET | /user/search/:search |
Single User | GET | /user/profile/:userId |
Update Picture | GET | /user/profile/:userId/picture |
Update Profile | PATCH | /user/profile/:userId |
User Follow | PATCH | /user/:userId/follow |
User Unfollow | PATCH | /user/:userId/unfollow |
Description | Method | URL |
---|---|---|
All Post | GET | /post/all |
All User Post | GET | /post/all/:userId |
Create Post | POST | /post |
Like Post | PATCH | /post/like/:postId |
Update Post | PATCH | /post/:postId |
Delete Post | DELETE | /post/:postId |
Description | Method | URL |
---|---|---|
Create Comment to Post | POST | /comments/:postId/all |
Get Comments of Post | GET | /comments/:postId |
Delete Comment to Post | DELETE | /comments/:postId/:commentId |
Technologies:
- React + Vite
- TypeScript
- TanStack Query
- ExpressJS
- MongoDB
- Prisma
- JWT for Auth
- Go to client and server directory and run
npm install
to both install dependencies. - Create
.env
file and add your configs. - Run
npm run dev
for development for client & server ornpm run build
for production.
⚠️ Warning: Do not push your.env
secrets carelessly.
Check .env.example
- DATABASE_URL="YOUR_DB_URL"
- PORT=5000
- ACCESS_TOKEN="SECRET_FOR_JWT"
- CLOUD_NAME="CLOUDINARY_NAME"
- CLOUD_API_KEY="CLOUDINARY_KEY"
- CLOUD_API_SECRET="CLOUDINARY_SECRET"