Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

288 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XClone

A full-stack clone of X (formerly known as Twitter) written in java.
Conventional Branch Conventional Commit License


Table of contents

Other Documentations


Screenshots


Tech Stack

Server

Field Tehnology
Main language Java
Framework Spring boot
Continuous integration Docker
Database MySQL
Networking RESTful API Socket
Scripting Language Kotlin Script
Build tool Maven

Client

Field Tehnology
Main language Java
Framework JavaFX
Styling CSS
Networking Java HTTP Client Socket

Architecture 📐

The project in whole uses a simple client-server architecture, however each of those modules leverages Clean architecture for independent development, decoupled structure, code adaptability and scalability.
for more technical detail checkout Technical information about architecture


Prerequirements ‼️

  • Java 25 (required)
  • Maven (optional)
  • Kotlin compiler / IntelliJ Idea (optional)
  • MySQL (optional*)
  • Docker desktop / Docker engine + Docker composer (optional*)

*: You can run the server module either by building the docker image or running a MySQL Server and configuring a file and running server manually.

How to build 🧱

Server

For the server module you can do two things:

  1. Build and run server manually
  2. Run server with docker To run the server using docker you can read the docker readme.

but to run the server without the docker:

  1. Clone the repo:
git clone https://github.com/ArkheimGroup/XClone.git
cd XClone
  1. Run a MySQL Server
  2. Configure application.properties inside resources folder: XClone/server/src/main/resources/application.properties (edit any variable shown with a ${} to their actual value, e.g. ${DB_HOST} -> 127.0.0.1)

IMPORTANT: You can do the configuration using a kotlin script inside root of the project called configure-db.kts to do this you can right click on configure-properties.kts and Run configure-properties.kts inside IntelliJ or you can run it in terminal using kotlin compiler:

kotlinc -script configure-properties.kts

Note: You either need to change this file or declare environment variables, to declare environment variables enter every field inside the application.properties that is Shown like this: ${} followed by a = and their value inside your terminal. e.g. ${DB_HOST} -> DB_HOST=127.0.0.1

  1. Compile the application: (run inside XClone/server) [On the same shell session as you declared your enviornment variables if you gone that way]
mvn clean package

Note: if you don't have maven installed on your machine run: ./mvnw clean package (for UNIX-Like/UNIX-Based operating systems like macOS or Linux) or .\mvnw.cmd clean package (for windows).

  1. Finally to run the server module:
java -jar target/*.jar

if you use Intellij Idea you can skip 4 and 5 and run ServerApplication.java

Client

Building client is much more straight forward:

  1. Clone the repo:
git clone https://github.com/ArkheimGroup/XClone.git
cd XClone
  1. build the project: (run inside XClone/client)
mvn clean package
  1. run the app:
java -jar target/clinet*.jar

or you can download the jar file from releases tab.

IMPORTANT: You can configure the client properties by editing config.properties inside client's resource folder (if you changed server's domain name or configured ports this step is crucial.)
if you have downloaded the jar file from releases tab, you need to put the config next to the jar file if you wan't to configure the api's url and socket's port and url.
to do this:
run kotlinc -script configure-properties.kts client inside root of the project
after that copy config.properties from resource folder of client right next to the jar file and you should be good to go.

If you had any problems setting up the project open up an issue.


Credits

This project wouldn't be possible without help of:
Matin Ardestani
Ramtin Jafari
Farnam Jahangard

For the icons: Lucide icons
repo badges: Shields.io

License

This project is licensed under GNU GPL v3, see LICENSE for more info.

Releases

Packages

Contributors

Languages