A social media app built
with
Express.js
and
React, running in
Docker using Docker Compose during development, and deployed directly to
Heroku using buildpacks.
- Monorepo structure utilising npm workspaces
- Backend, database, and frontend can all be built and started using a single Docker Compose command
- Backend is built
in
Node.js using the
Express.js framework and the
Prisma ORM
PostgreSQL is used as the database
- Frontend is built
in
React using
Tailwind CSS for styling
React Router is used for frontend routing
Zustand is used for store management in the frontend
- Fully implemented user signup and log in system
- Posts are shown to users using a basic recommendation algorithm
- Users can vote on posts, and users earn points called 'Formits' based on their posts' scores
- Uses
GitHub Actions to deploy the application to
Heroku on every push and pull request
The project requires .env files in the roots of the former-backend, former-frontend, and packages/shared directories
PORT— the port that the server runs on, its value is3000by default if unsetDATABASE_URL— the URL of the database e.g.postgresql://postgres:postgres@localhost:5432/formerJWT_SECRET— the JSON Web Token secret
VITE_API_URL— the URL to the backend e.g.http://localhost:3000/api
DATABASE_URL— the same database URL that the backend uses
- At the project root, run
docker compose -f docker-compose.dev.yml upto start up the Database in docker - Run
npm installin the root directory to install dependencies - Run
npm run devin both theformer-backendandformer-frontenddirectories to start the dev backend and frontend servers - The project will be available on http://localhost:5173/
- (Optional) to seed data, run
npm run seedin the root directory
- At the project root, run
docker compose upto start up all the services in Docker - The project will be available on http://localhost:5173/
- Show comments on posts
- Allow comment creation
- Add a profile page
- Add a search bar
- Add sorting and advanced search
- Add post and comment editing and deletion
- Add user profile editing and deletion
- Add custom error pages (404, 500)
- Add pagination to searching or infinite scrolling
- Add email verification
- Add Redis caching
- Create a logo and icon