{"id":15111331,"url":"https://github.com/farnam-hs/personal-blog","last_synced_at":"2025-09-06T11:47:56.750Z","repository":{"id":255534272,"uuid":"852927307","full_name":"Farnam-Hs/Personal-Blog","owner":"Farnam-Hs","description":"A practical web-based project built using Java Servlets, JSP, Tomcat and file-based repositories. This project helps improve backend web development skills through real-world application design.","archived":false,"fork":false,"pushed_at":"2024-09-16T10:07:26.000Z","size":3686,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T22:21:36.060Z","etag":null,"topics":["filesystem","java","json","jsp","maven","servlet","tomcat","webapp"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Farnam-Hs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T17:09:03.000Z","updated_at":"2024-12-09T11:54:32.000Z","dependencies_parsed_at":"2024-09-16T11:37:10.622Z","dependency_job_id":"978753c3-210c-4277-92e2-ea78de046ffc","html_url":"https://github.com/Farnam-Hs/Personal-Blog","commit_stats":null,"previous_names":["farnam-hs/personal-blog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Farnam-Hs%2FPersonal-Blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Farnam-Hs%2FPersonal-Blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Farnam-Hs%2FPersonal-Blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Farnam-Hs%2FPersonal-Blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Farnam-Hs","download_url":"https://codeload.github.com/Farnam-Hs/Personal-Blog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246037809,"owners_count":20713474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filesystem","java","json","jsp","maven","servlet","tomcat","webapp"],"created_at":"2024-09-26T00:03:30.973Z","updated_at":"2025-03-28T13:33:53.989Z","avatar_url":"https://github.com/Farnam-Hs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\n\n\u003cdiv align=\"center\"\u003e\n\n  # Personal Blog\n  \n\u003c/div\u003e\n  \n---\n\n## 🎯 Overview\n\nThis project is a web-based personal blog application built using Java Servlets, JSP, and Tomcat. It allows users to browse articles and provides an admin interface to add, edit, or delete blog posts. All articles are stored as JSON files in the filesystem.\nThe image below illustrates the application design.\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/design.png\" alt=\"design\"/\u003e\n\u003c/p\u003e\n\n---\n\n## ✨ Features\n\n- **View Articles:** Browse and read articles on the blog that their publishing date is today or earlier.\n- **Admin Section:** Add, edit, and delete blog posts through the admin interface.\n- **Article Management:** Articles are stored in JSON format, and basic file operations (CRUD) are performed via Java code.\n- **Basic Authentication:** Admin section is protected with basic authentication for security.\n- **Responsive UI:** The UI is styled with CSS and provides a clean and user-friendly interface.\n\n---\n\n## 🖼️ Screenshots\n\n**Home Page**\n\n\u003cimg src=\"images/home.PNG\" alt=\"home\"/\u003e\n\n**Article Page**\n\n\u003cimg src=\"images/article.PNG\" alt=\"article\"/\u003e\n\n**Login Page**\n\n\u003cimg src=\"images/login.PNG\" alt=\"login\"/\u003e\n\n**Admin Page**\n\n\u003cimg src=\"images/admin.PNG\" alt=\"admin\"/\u003e\n\n**New Article Page**\n\n\u003cimg src=\"images/add.PNG\" alt=\"add\"/\u003e\n\n**Edit Article Page**\n\n\u003cimg src=\"images/edit.PNG\" alt=\"edit\"/\u003e\n\n---\n\n## 🛠️ Technologies Used\n- Java 17\n- Servlets 5.0 (Jakarta)\n- JSP (Jakarta Server Pages) \u0026 JSTL (Jakarta Standard Tag Library) 3.0\n- Google Gson 2.11 (Handling JSON files)\n- Apache Tomcat 10.1\n- Maven 3.8.5\n\n---\n\n## 🚀 How to Run\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/Farnam-Hs/Personal-Blog.git\ncd Personal-Blog\n```\n\n### 2. Build the Project\nUse Maven to build the project:\n```bash\nmvn clean install\n```\n\n### 3. Deploy to Tomcat\nAdd the project to your Tomcat server in your IDE or manually.\n\n### 4. Start Tomcat:\nStart the Tomcat server\n\n### 5. Access the Application\nOpen a web browser and navigate to:\n\n```http://localhost:8080/[Context-Path]``` or ```http://localhost:8080/[Context-Path]/home```\n\n---\n\n## 📘 Usage Example\n\n**1. Viewing Articles:** \n- On the home page, all blog articles will be listed. Click on a title to view the full article.\n\n**2. Admin Actions:**\n- Navigate to the admin section using the designated admin URL ```/admin``` or click on the ```Login``` button.\n- Login with the correct credentials to access admin actions. (Username: ```admin``` | Password: ```admin```)\n\n**3. CRUD Operations:** \n- **Add New Article:** Click on the ```+``` button in the admin section, fill in the article title, choose the publishing date, write the content, and ```Publish```.\n- **Edit Article:** Click on the ```Edit``` button next to an article in the admin section, modify the title, content, or the publishing date and ```Update```.\n- **Delete Article:** Click the ```Delete``` button in the admin section to remove an article.\n\n---\n\n## ⚠️ Error Handling\n\n- **Unauthorized Access (403):** Attempting to access restricted URLs will result in a 403 Forbidden error.\n- **Not Found (404):** : Accessing non-existent pages or malformed URLs will result in a 404 Not Found error.\n- **Internal Server Error (500):** If an unexpected issue occurs on the server (e.g., failure in file operations or processing), a 500 Internal Server Error will be shown to the user.\n\n---\n\nSample solution for the [Personal Blog](https://roadmap.sh/projects/personal-blog) challenge from [roadmap.sh](https://roadmap.sh/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarnam-hs%2Fpersonal-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarnam-hs%2Fpersonal-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarnam-hs%2Fpersonal-blog/lists"}