Overview | Installation | Usage | Legal
This project is a learning initiative aimed at replicating the core features of Twitter (X). It consists of a frontend built with Vite + React and a backend powered by Node.js (Express) with Sequelize as the ORM. The backend is hosted in a separate repository, which must be set up for full functionality.
Key features:
- Modern frontend stack with Vite and React.
- Backend API using Express and PostgreSQL.
- Database migrations and seeders via Sequelize.
- Clone the develop branch of the frontend repository:
git clone -b develop https://github.com/Vitek14/twitter.git
- Navigate to the project directory:
cd twitter - Install dependencies:
npm install
- Clone the master branch of the backend repository:
git clone -b master https://github.com/Vitek14/x-backend.git
- Navigate to the backend directory:
cd x-backend - Install backend dependencies:
npm install
-
Ensure PostgreSQL and pgAdmin4 are installed.
-
Create a
.envfile in the backend root directory with the following content:DB_HOST=localhost DB_USER=postgres DB_PASSWORD=1234 DB_NAME=twitter_development DB_PORT=5432 PRIVATE_KEY=testestest1231254125
Adjust values to match your PostgreSQL setup.
-
Run database migrations:
npx sequelize-cli db:migrate
-
(Optional) Seed initial data:
npx sequelize-cli db:seed:all
Note for non-Windows users: If seeding fails due to date formatting, manually adjust the seed files in
seeders/or skip this step.
Start the Vite development server:
npm run devThe frontend will be available at http://localhost:5173.
Start the Express server:
npm startThe backend API will run on http://localhost:3000.
- Tested with:
- Node.js: v22.11.0
- npm: 10.9.0
- Ensure both frontend and backend servers are running simultaneously for full functionality.
- The backend requires PostgreSQL to be actively running with the configured database.
Important Notice
This project is strictly educational in nature and was created for learning purposes only. It is not:
- Associated with or endorsed by X Corp. (formerly Twitter) or any of its affiliates
- Intended to replicate or compete with x.com
- Designed for commercial use
- Meant to harm, defame, or infringe upon the intellectual property of any company
All references to Twitter/X functionality and branding are used:
- Solely for educational demonstration
- Under fair use principles
- Without claim to original ownership
The codebase is intentionally simplified and lacks many critical features required for a production environment. This implementation does not represent security best practices for authentication or database management.
Trademarks
Any mentioned trademarks (Twitter, X, etc.) belong to their respective owners. The "Twitter Clone" naming is used purely for descriptive clarity, not as an official designation.
Non-Commercial
This project is open-source and freely available for educational use only.