You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application follows a traditional Model-View-Controller (MVC) architecture:
18
18
19
-
***Model:** The data layer, represented by classes in `src/main/java/com/pedroreis/dev/model`, which map to database tables.
20
-
***View:** The presentation layer, implemented using JTE templates located in `src/main/jte`.
21
-
***Controller:** The request-handling layer, consisting of Spring Boot controllers in `src/main/java/com/pedroreis/dev/controller` that process user input, interact with the model, and select the appropriate view to render.
19
+
***Model:** The data layer, represented by classes in `src/main/java/com/pedroreis/dev/model`, which map to database tables.
20
+
***View:** The presentation layer, implemented using JTE templates located in `src/main/jte`.
21
+
***Controller:** The request-handling layer, consisting of Spring Boot controllers in `src/main/java/com/pedroreis/dev/controller` that process user input, interact with the model, and select the appropriate view to render.
22
22
23
23
### Data Flow
24
24
25
-
1.The `GithubClient` fetches repository data from the GitHub API.
26
-
2.The data is stored in the SQLite database.
27
-
3.Controllers retrieve data from the database via the models.
28
-
4.The data is passed to the JTE templates.
29
-
5.The JTE templates are rendered as HTML and sent to the browser.
25
+
1. The `GithubClient` fetches repository data from the GitHub API.
26
+
2. The data is stored in the SQLite database.
27
+
3. Controllers retrieve data from the database via the models.
28
+
4. The data is passed to the JTE templates.
29
+
5. The JTE templates are rendered as HTML and sent to the browser.
30
30
31
31
### Key Directories
32
32
33
-
*`src/main/java`: Contains the Java source code for the application.
34
-
*`src/main/resources`: Contains the application's resources, such as configuration files, database schema, and static assets.
35
-
*`src/main/jte`: Contains the JTE templates for the view layer.
36
-
*`target`: Contains the compiled application code and build artifacts.
33
+
*`src/main/java`: Contains the Java source code for the application.
34
+
*`src/main/resources`: Contains the application's resources, such as configuration files, database schema, and static assets.
35
+
*`src/main/jte`: Contains the JTE templates for the view layer.
36
+
*`target`: Contains the compiled application code and build artifacts.
37
37
38
38
## Building and Running
39
39
40
40
### Prerequisites
41
41
42
-
*Java 25
43
-
*Maven
42
+
* Java 25
43
+
* Maven
44
44
45
45
### Running Locally
46
46
47
-
1.Clone the repository.
48
-
2.Run the application with `mvn spring-boot:run`.
49
-
3.The application will be available at `http://localhost:8080`.
47
+
1. Clone the repository.
48
+
2. Run the application with `mvn spring-boot:run`.
49
+
3. The application will be available at `http://localhost:8080`.
50
50
51
51
### Building for Production
52
52
53
-
1.Run `mvn clean package` to build the application JAR file.
54
-
2.The JAR file will be located in the `target` directory.
53
+
1. Run `mvn clean package` to build the application JAR file.
54
+
2. The JAR file will be located in the `target` directory.
55
55
56
56
### Running with Docker
57
57
58
-
1.Build the Docker image with `docker build -t pedroreis.dev .`.
59
-
2.Run the Docker container with `docker run -p 8080:8080 pedroreis.dev`.
58
+
1. Build the Docker image with `docker build -t pedroreis.dev .`.
59
+
2. Run the Docker container with `docker run -p 8080:8080 pedroreis.dev`.
60
60
61
61
## Development Conventions
62
62
63
-
* The project follows the standard Spring Boot project structure.
64
-
* JTE templates are used for the view layer.
65
-
* The application uses a `GithubClient` to fetch data from the GitHub API.
66
-
* The data is stored in an SQLite database.
67
-
* The database schema is defined in `src/main/resources/schema.sql`.
68
-
* Initial data is inserted from `src/main/resources/data.sql`.
63
+
* The project follows the standard Spring Boot project structure.
64
+
* JTE templates are used for the view layer.
65
+
* The application uses a `GithubClient` to fetch data from the GitHub API.
66
+
* The data is stored in an SQLite database.
67
+
* The database schema is defined in `src/main/resources/schema.sql`.
68
+
* Initial data is inserted from `src/main/resources/data.sql`.
69
+
70
+
## Dependencies
71
+
72
+
***Spring Boot Starter Web:** Provides support for building web applications, including RESTful applications, using Spring MVC.
73
+
***Spring Boot Starter JDBC:** Provides support for using JDBC to connect to a database.
74
+
***SQLite JDBC:** The JDBC driver for the SQLite database.
75
+
***JTE:** The Java Template Engine used for rendering the view layer.
76
+
***Jackson Datatype JSR310:** Provides support for serializing and deserializing Java 8 date and time types.
0 commit comments