[[ CURRENTLY IN DEVELOPMENT, STABLE LOCAL V1 RELEASED ]]
A clone of X.com built to enhance our understanding of web development. This project was created as part of our personal learning journey.
- Overview
- Features
- Technologies Used
- Installation
- Environment Variables Setup
- Usage
- How to use the app
- Legal Disclaimer
This is a fully functional clone of X.com, designed to simulate key features of the platform, including user registration, transactions, account management, and other e-commerce functionalities. The goal of this project was to improve my understanding of front-end and back-end integration, database management, and web application security.
- User Authentication: Registration, login, JWT.
- User Interactions: Posting, reposting, commenting, liking, and sending private messages (DMs).
- Frontend: HTML, CSS, JavaScript (React.js)
- Backend: Golang
- Database: Postgres
- Authentication: JWT (JSON Web Tokens) using Gin.
- Version Control: Git, GitHub
To get a local copy up and running:
- Clone the repository and set the required environment-variables as stated in Environment Variables Setup:
git clone https://github.com/Merge64/x-clone.git
- Start the backend by running the main file:
cd ./x-clone/server
go run main.go
- Navigate into the client directory:
cd ..
cd ./x-clone/client
- Install dependencies:
npm install
- Run the client:
npm run dev
- Create a
.env
file in the root directory. - Copy the following content into
.env
replacing it with your credentials:
# Database connection for Docker
DATABASE_URL="jdbc:postgresql://<docker-host>:<port>/<database_name>"
# Host configuration
HOST=localhost
# PostgreSQL credentials
POSTGRES_DB=<database_name>
POSTGRES_USER=<username>
POSTGRES_PASSWORD=<password>
# Ports configuration
DATABASE_PORT=5432
SERVER_PORT=8080
# Local database URL
DATABASE_URL_LOCAL="postgresql://<username>:<password>@localhost:<port>/<database_name>"
# Secret key
SECRET=<your_secret_key>
- Add the
.env
file to.gitignore
to prevent committing sensitive information:
# Ignore .env files
.env
This project is intended for educational purposes only. It is designed to help improve understanding of web development and the integration of frontend and backend technologies. Please note that this is not a commercial project and is not meant for production use. If you wish to contribute, improve, or extend the project, feel free to create pull requests or open issues to discuss potential changes.
- After following the installation steps above, open the app in your browser.
- Create an account by registering on the platform.
- Explore features such as posting, commenting, liking, and sending direct messages (DMs).
- Manage your account settings and try out various features available to registered users.
This project is a clone created for educational purposes only and not for commercial use. All features and designs have been developed to simulate the basic functionality of X.com without violating intellectual property rights. The project is not affiliated with or endorsed by X.com or any related companies.