Skip to content

3antozz/Odin-Book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Odinbook

A full-stack social media application built for real-time content sharing and interaction.

App Interface

Login page

Login Page

Specific Post page

Post Page

Notifications page

Notifications Page

User Profile

User Profile

Followers List

Followers List

Note

App is hosted with free tier services, first load might take some time.

Why build this project ?

This was one of the first FullStack projects I created, it's purpose was to tie everything I learned from The Odin Project's course together in a relatively complex project. Social media apps are among the most widely used applications on the web today.

Features

  • Authentication with username/password AND Github Auth (cookies based).
  • Real time interaction updates (posts, follow requests, comments, likes).
  • Image sharing capability.
  • User connection and interaction.

Technologies Used

Frontend

  • Javascript
  • React
  • Vite
  • Vercel
  • Socket.IO

Backend

  • Express
  • Nodejs
  • PostgreSQL
  • Prisma ORM
  • Socket.IO
  • Cloudinary
  • OnRender
  • Neon

πŸ› οΈ How to Run the Project Locally

Prerequisites

  • Node.js
  • npm
  • PostgreSQL (ensure your database is running)
  • Basic knowledge of using a terminal (steps are beginner-friendly)

1. Clone the Repository

git clone https://github.com/3antozz/Odin-Book
cd Odin-Book

2. Setup the Backend (API)

cd api
npm install

Important

Github Authentification won't work unless you register a Github OAuth application and acquire your own tokens, set Authorization callback URL field to: http://localhost:3000/auth/github/callback. Others fields may be required but are not important.

1- Create a .env file in the api/ directory (based on .env.example) and fill in the required environment variables such as:

  • Database connection URL
  • Session secret
  • Cloudinary credentials
  • Github Tokens (if available)

Note

Cloudinary credentials are needed to upload images, else it's not possible.

2- Start the backend server:

npm start

Note

The backend will run on http://localhost:3000 by default.

3. Setup the Frontend (Client)

1- Open a new terminal window or tab:

cd client
npm install
npm run dev

2- Rename the .env.example file to .env in the client/ directory

Note

The frontend will run on http://localhost:5173 by default.

4. Open in Browser

1- Once both servers are running:

2- Visit http://localhost:5173 in your browser

Libraries Used

Frontend

  • Lucide React – Import Icons.
  • react-virtuoso – React component that displays large data sets using virtualized rendering (render when visible in viewport).
  • Socket.IO – Low-latency, bidirectional and event-based communication between a client and a server for real time updates.
  • date-fns – Used for manipulating JavaScript dates.

Backend

  • bcryptjs – For securing passwords by hashing and salting.
  • express-session – Simple session middleware for Authenticating.
  • prisma/client – ORM - Auto-generated and type-safe query builder for Node.js.
  • prisma-session-store – An express session store implementation for the Prisma ORM.
  • passport – Express-compatible authentication middleware for Node.js.
  • passport-local – This module lets you authenticate using a username and password in your Node.js applications.
  • passport-github2 – This module lets you authenticate using GitHub OAuth 2.0 in your Node.js applications.
  • express-validator – User input validation middleware.
  • cloudinary – Images storage service integration.
  • multer – Node.js middleware for handling multipart/form-data, used for uploading files.
  • express-async-handler – Asynchronous exception-handling middleware.
  • Socket.IO – Low-latency, bidirectional and event-based communication between a client and a server for real time updates.
  • cors – Package for providing a Connect/Express middleware that can be used to enable CORS.

About

A full-stack social media application built for real-time content sharing and interaction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors