- Student name: Abdullah Alabbad
- Student ID: s3635950
- Github repository link
Neovim editor was mainly used to develop this program. During the development, the program was compiled and tested through the command line with java SDK. But this project was also adapted to be compiled and run using Intellij IDEA IDE.
Login scene
Get most liked posts
Add new post
- Java SDK 20
- JavaFX 20.0.2
- SQLite JDBC 3.43.0.0
- Junit 4.13.2 (optional if you want to run the unit tests)
- Create a folder in the root directory of the project and name it
lib
- Download JavaFX and put all jar file in
lib
folder - Download SQLite JDBC and put the jar file in
lib
folder - Download Junit and put all jar file in
lib
folder (optional if you want to run the unit tests)
There are two ways to run the program:
- Open the root folder in Intellij IDEA IDE:
File -> Open
. - In the file explorer, expand
src
thenDataAnalyticsHub
folders. - Right-click on
Main
class then selectMore Run/Debug -> Modify Run Configurations...
- In the "Build and run" section, open the "Modify options" menu then select "Add VM options"
- Add the following in the "VM options" field:
--module-path $ProjectFileDir$/lib --add-modules javafx.controls,javafx.fxml
- Hit "Apply" then "Ok" button
- Now run the program by hitting the run button in the top right corner of the IDE or use the hotkey
ctrl+R
.
- Open CMD.exe then navigate to the root directory of the project
- Run
run-win.bat
script:
NOTE: This was tested in Windows 11 running in a virtual machine
.\run-win.bat
- Open the terminal then navigate to the root directory of the project
- Run
run.sh
script:
NOTE: you might need to add execute flag to run the script:
chmod u+x run.sh
./run.sh
The login information for the default admin user is:
- Username:
admin
- Password:
admin
NOTE: Not all classes are included in the class diagram. This is just an abstract digram.
This app was build using MVC architecture. The model has all the main object definitions as well as the business logic. Two data access layers were implemented: UserDao
and PostDao
. These two objects execute the SQL queries to the SQLite database and return any results to the controllers.The views were built in both java and FXML. The controllers basically bridge the view and the model. So, all form submissions, event handling and validations happen in the controllers. AppState
class is a singleton which is used as a global state for the application. It stores the logged in user, the stage object, and a method to switch scenes. The project was developed to adhere to SOLID principles of object-oriented programming.