diff --git a/20241210001045-technical.org b/20241210001045-technical.org index b2960e9..a9ffa92 100644 --- a/20241210001045-technical.org +++ b/20241210001045-technical.org @@ -30,8 +30,6 @@ In this file I want to include technical information (things related to programm - [[id:f09cb4ed-1407-4187-9002-de2c5db13a8f][Server MOC]] -- [[id:631b2086-4b8f-4fe3-829d-be1dc014e293][design-patterns-notes]] - - [[id:37495d5f-2a77-40bc-b45c-8163189bbe6b][technical-commonplace]] - [[id:22737796-6D31-49D5-84F2-F7BC73E45144][Concepts]] diff --git a/20260101010049-concepts.org b/20260101010049-concepts.org index d26df18..1592f9a 100644 --- a/20260101010049-concepts.org +++ b/20260101010049-concepts.org @@ -2,6 +2,7 @@ :ID: 22737796-6D31-49D5-84F2-F7BC73E45144 :END: #+title: Concepts +#+filetags: :technical:concepts: In this node lies notes relating to theoretical concepts tying with maths and/or computer science. I will need to find a way to categorise different notes, but it's a wip. @@ -9,7 +10,7 @@ In this node lies notes relating to theoretical concepts tying with maths and/or Part of being a software engineer is having a good grasp of mathematical concepts. Here are some notes on various mathematical concepts that I find useful. -- [[id:F32F8F09-3DEC-4FD1-8CFA-401A316E906B][xor]] +- [[id:F32F8F09-3DEC-4FD1-8CFA-401A316E906B][XOR]] * Core Programming Concepts @@ -17,6 +18,7 @@ Part of being a software engineer is having a good grasp of mathematical concept - [[id:275988a8-59d8-40c8-a8b4-47118d6eb834][Big O Notation, Time and Space Complexity]] +- [[id:631b2086-4b8f-4fe3-829d-be1dc014e293][Design patterns]] Some core programming concepts that are essential for software development. The things I need to add here are: * Concepts to learn and talk about (cs and maths) diff --git a/20260101011126-xor.org b/20260101011126-xor.org index 71dbf71..9958524 100644 --- a/20260101011126-xor.org +++ b/20260101011126-xor.org @@ -2,6 +2,7 @@ :ID: F32F8F09-3DEC-4FD1-8CFA-401A316E906B :END: #+title: xor +#+filetags: :maths:notes: XOR stands for exclusive or. It is a logical operation that outputs true only when the inputs differ (one is true, the other is false). If both inputs are the same (both true or both false), the output is false. diff --git a/20260104155940-server_backend.org b/20260104155940-server_backend.org index b820988..7319cab 100644 --- a/20260104155940-server_backend.org +++ b/20260104155940-server_backend.org @@ -1,6 +1,43 @@ :PROPERTIES: :ID: 9a71daa4-d9d4-4706-98f1-72e3d4eda9bc :END: -#+title: server_backend +#+title: Server Backend #+filetags: :server:java:api: +* Introduction +The original backend was written using FastAPI and has now been archived. + +In replacement, I have written a Java Spring Boot backend that handles all of the API calls the domain ~zainezq.com~ uses. + +Here is the repository for the backend: + +[[https://gitea.zainezq.com/zaine/org_backend][Link to the backend repository]] + + +* Structure + +The backend is structured as a typical Spring Boot application. It consists of several packages that handle different aspects of the application: +- **Controllers**: These classes handle incoming HTTP requests and map them to appropriate service methods. +- **Services**: These classes contain the business logic of the application. +- **Repositories**: These classes interact with the database to perform CRUD operations. +- **Models**: These classes represent the data structures used in the application. + +The full list of API endpoints can be viewed using Swagger UI, which is available at the ~/swagger-ui.html~ endpoint once the application is running. + +* Running the Application + +The application is built using Maven. To run the application, you can utilise the ~Makefile~ provided in the repository. + +The project is packaged as a Docker container, making it easy to deploy. You can build and run the Docker container using the following commands: + +#+begin_src bash + + docker compose build org_backend + + docker compose up -d org_backend + + # To check logs + + docker logs -f org_backend + +#+end_src diff --git a/all-files.json b/all-files.json index 0433252..0cb5412 100644 --- a/all-files.json +++ b/all-files.json @@ -467,16 +467,16 @@ "title": "self_hosting", "url": "/20250723190927-self_hosting.html" }, + { + "id": "9a71daa4-d9d4-4706-98f1-72e3d4eda9bc", + "title": "Server Backend", + "url": "/20260104155940-server_backend.html" + }, { "id": "f09cb4ed-1407-4187-9002-de2c5db13a8f", "title": "Server MOC", "url": "/20251019114736-server_moc.html" }, - { - "id": "9a71daa4-d9d4-4706-98f1-72e3d4eda9bc", - "title": "server_backend", - "url": "/20260104155940-server_backend.html" - }, { "id": "2d7f1ccc-99d7-4c45-8fe7-4b87080edb01", "title": "so_good_they_cant_ignore_you", diff --git a/all-files.org b/all-files.org index cc317da..2474603 100644 --- a/all-files.org +++ b/all-files.org @@ -126,8 +126,8 @@ This file is auto-generated. Do not edit manually. * S - [[id:99533f2d-a4e8-41d0-a605-c7d4cef6f995][self_hosting]] +- [[id:9a71daa4-d9d4-4706-98f1-72e3d4eda9bc][Server Backend]] - [[id:f09cb4ed-1407-4187-9002-de2c5db13a8f][Server MOC]] -- [[id:9a71daa4-d9d4-4706-98f1-72e3d4eda9bc][server_backend]] - [[id:2d7f1ccc-99d7-4c45-8fe7-4b87080edb01][so_good_they_cant_ignore_you]] - [[id:efe0360d-8d81-4372-833d-ad58e67d17c6][socket_programming_in_c]] - [[id:6820973F-613E-441A-BC1D-8FE5CD9BD6F7][solid_principles]] diff --git a/assets/scripts/script.js b/assets/scripts/script.js index 950ab7e..ab94cb8 100755 --- a/assets/scripts/script.js +++ b/assets/scripts/script.js @@ -252,22 +252,21 @@ function initStackedNavigation() { if (!url.pathname.endsWith(".html")) return; e.preventDefault(); - pushPane(url.pathname + url.hash); + pushPane(url.pathname, url.hash); }); } -async function pushPane(urlWithHash) { +async function pushPane(pathname, hash = "") { const track = document.querySelector(".stack-track"); if (!track) return; - const existing = [...track.children].find(p => p.dataset.url === urlWithHash); + const existing = [...track.children].find(p => p.dataset.url === pathname); if (existing) { existing.scrollIntoView({ behavior: "smooth", inline: "end" }); return; } - const [url, hash] = urlWithHash.split("#"); - const res = await fetch(url); + const res = await fetch(pathname); const doc = new DOMParser().parseFromString(await res.text(), "text/html"); const content = doc.querySelector("#content"); @@ -275,7 +274,7 @@ async function pushPane(urlWithHash) { const pane = document.createElement("article"); pane.className = "stack-pane"; - pane.dataset.url = urlWithHash; + pane.dataset.url = pathname; pane.appendChild(content); track.appendChild(pane);