{"id":20271929,"url":"https://github.com/hoangsonww/post-analyzer-webserver","last_synced_at":"2025-04-11T04:32:44.296Z","repository":{"id":240456342,"uuid":"802684768","full_name":"hoangsonww/Post-Analyzer-Webserver","owner":"hoangsonww","description":"📋 Welcome to the Post Viewer and Analyzer: Effortlessly manage, analyze, and create posts with our intuitive web platform. Fetch posts, analyze character frequencies, and enjoy insightful visualizations—all in one place!","archived":false,"fork":false,"pushed_at":"2025-03-17T00:34:33.000Z","size":526,"stargazers_count":22,"open_issues_count":0,"forks_count":12,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-25T02:39:56.260Z","etag":null,"topics":["backend","character-frequencies","framework","full-stack-web-development","fullstack","fullstack-development","go","golang","golang-application","post-analyzer"],"latest_commit_sha":null,"homepage":"https://hoangsonww.github.io/Post-Analyzer-Webserver/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hoangsonww.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-05-19T01:19:31.000Z","updated_at":"2025-03-23T03:03:30.000Z","dependencies_parsed_at":"2025-02-14T21:26:57.204Z","dependency_job_id":"34e5ba9c-51f7-4878-aff9-45a79739b22c","html_url":"https://github.com/hoangsonww/Post-Analyzer-Webserver","commit_stats":null,"previous_names":["hoangsonww/post-analyzer","hoangsonww/post-analyzer-webserver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangsonww%2FPost-Analyzer-Webserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangsonww%2FPost-Analyzer-Webserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangsonww%2FPost-Analyzer-Webserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangsonww%2FPost-Analyzer-Webserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoangsonww","download_url":"https://codeload.github.com/hoangsonww/Post-Analyzer-Webserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345202,"owners_count":21088231,"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":["backend","character-frequencies","framework","full-stack-web-development","fullstack","fullstack-development","go","golang","golang-application","post-analyzer"],"created_at":"2024-11-14T12:40:04.090Z","updated_at":"2025-04-11T04:32:44.236Z","avatar_url":"https://github.com/hoangsonww.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Post Viewer and Analyzer with Go\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"assets/post-ui.png\" alt=\"Post Viewer and Analyzer\" width=\"100%\" style=\"border-radius: 8px;\"\u003e\n\u003c/p\u003e\n\n## Introduction\nThe Post Viewer and Analyzer is a *very* simple web-based application built with Go. It serves a web interface that allows users to fetch posts from the JSONPlaceholder API, save these posts to a file, and perform a character frequency analysis on the saved data. This application demonstrates the use of Go for server-side web development, including handling HTTP requests, processing JSON, and rendering HTML templates.\n\n## Features\n- **Fetch Data**: Users can fetch posts from the external JSONPlaceholder API.\n- **Save Data**: Automatically saves fetched posts into a local JSON file.\n- **Analyze Data**: Performs a character frequency analysis on the contents of the saved JSON file.\n- **Web Interface**: Simple and user-friendly web interface to interact with the application.\n\n## Live Deployment\n\nThe application is deployed on Render and can be accessed using the following link: [Post Viewer and Analyzer](https://post-analyzer-webserver.onrender.com)\n\nPlease note that the application is hosted on a free tier and may take some time to load initially.\n\n## Technology Stack\n- **Go**: All server-side logic is implemented in Go, utilizing its standard library for web server functionality, file I/O, and concurrency.\n- **HTML/CSS**: Front-end layout and styling.\n- **JSONPlaceholder API**: External REST API used for fetching sample post data.\n\n### Why Go?\n- **Concurrency**: Go's built-in support for concurrency makes it easy to write efficient and scalable web servers.\n- **Standard Library**: Go's standard library provides robust support for web development, including an HTTP server, JSON encoding/decoding, and file I/O.\n- **Performance**: Go is known for its fast compilation times and efficient runtime performance, making it a great choice for web applications.\n- **Community**: Go has a large and active community, with extensive documentation and libraries available for web development.\n\n### Example Analysis Result\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"assets/analyzed.png\" alt=\"Character Frequency Analysis\" width=\"100%\" style=\"border-radius: 8px;\"\u003e\n\u003c/p\u003e\n\n## Getting Started\n\n### Prerequisites\n- Go (version 1.14 or higher recommended)\n- Internet connection (for fetching data from the external API)\n- Web browser (for accessing the application)\n\n### Installation\n1. **Clone the repository:**\n   ```\n   git clone https://github.com/hoangsonww/Post-Analyzer-Webserver.git\n   cd Post-Analyzer-Webserver\n   ```\n\n2. **Run the application:**\n   ```\n   go run main.go\n   ```\n\n### Usage\n1. **Run the application using the steps mentioned above, do not forget to run `go run main.go`!**\n2. **Open your web browser.**\n3. **Navigate to `http://localhost:8080/` to access the application.**\n4. **Use the following endpoints to interact with the application:**\n    - **Home Page**: `/`\n    - **Fetch Posts**: `/fetch` - Fetches posts from the JSONPlaceholder and saves them to a local file.\n    - **Analyze Character Frequency**: `/analyze` - Analyzes the frequency of each character in the saved posts.\n    - **Add Post**: `/add` - Adds a new post to the saved posts.\n5. Because it is currently a Backend-focus application, you can greatly enhanced it by adding a polished Frontend to it, such as by using React.js.\n\n## Application Structure\n- **main.go**: Contains all the server-side logic including API calls, concurrency handling, file operations, and web server setup.\n- **home.html**: HTML template file used for rendering the web interface.\n- **go.mod**: Go module file that defines the project's dependencies.\n- **posts.json**: Local JSON file used to store the fetched posts.\n\n## Contributing\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Contact\nSon Nguyen - [https://github.com/hoangsonww](https://github.com/hoangsonww)  \n\n## Acknowledgements\n- [Go](https://golang.org/)\n- [JSONPlaceholder](https://jsonplaceholder.typicode.com/)\n  \n---\n\u003cimg src=\"https://img.shields.io/badge/License-MIT-green\" alt=\"License\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Go-1.14-blue?style=flat\u0026logo=go\" alt=\"Go version\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Status-Completed-orange\" alt=\"Status\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Version-1.0.0-blue\" alt=\"Version\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Year-2024-lightgrey\" alt=\"Year\"\u003e\n\n---\n\nCreated with ❤️ by [Son Nguyen](https://github.com/hoangsonww) in 2024.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoangsonww%2Fpost-analyzer-webserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoangsonww%2Fpost-analyzer-webserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoangsonww%2Fpost-analyzer-webserver/lists"}