{"id":30271467,"url":"https://github.com/bintangyosua/shortenurl","last_synced_at":"2025-08-16T04:17:57.198Z","repository":{"id":298556988,"uuid":"1000386741","full_name":"bintangyosua/shortenurl","owner":"bintangyosua","description":"A simple and scalable URL shortener built with Go, Echo, Templ, HTMX, GORM, and PostgreSQL. This project allows users to generate and manage short URLs with clean architecture and dynamic frontend interactions.","archived":false,"fork":false,"pushed_at":"2025-06-11T17:50:30.000Z","size":8704,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-11T19:16:06.438Z","etag":null,"topics":["echo","golang","gorm","shortener","templ"],"latest_commit_sha":null,"homepage":"","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/bintangyosua.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":"2025-06-11T17:43:48.000Z","updated_at":"2025-06-11T17:54:28.000Z","dependencies_parsed_at":"2025-06-11T19:16:10.005Z","dependency_job_id":"3ab8f510-f0ae-4527-9958-a6688802043f","html_url":"https://github.com/bintangyosua/shortenurl","commit_stats":null,"previous_names":["bintangyosua/shortenurl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bintangyosua/shortenurl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintangyosua%2Fshortenurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintangyosua%2Fshortenurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintangyosua%2Fshortenurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintangyosua%2Fshortenurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bintangyosua","download_url":"https://codeload.github.com/bintangyosua/shortenurl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bintangyosua%2Fshortenurl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270665863,"owners_count":24624766,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["echo","golang","gorm","shortener","templ"],"created_at":"2025-08-16T04:17:53.784Z","updated_at":"2025-08-16T04:17:57.187Z","avatar_url":"https://github.com/bintangyosua.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Shortener\n\nThis is a simple URL shortener service written in Go using the Templ templating engine. It allows users to shorten long URLs into shorter, more manageable links.\n\n## Features\n\n- Shorten URLs\n- Redirect to original URLs\n- Customizable short URLs (future implementation)\n- Simple and clean user interface\n\n## Technologies Used\n\n- Go\n- Templ\n- PostgreSQL (default, configurable)\n\n## Installation\n\n1.  Clone the repository:\n\n    ```bash\n    git clone \u003crepository_url\u003e\n    cd shortenurl\n    ```\n\n2.  Install dependencies:\n\n    ```bash\n    go mod download\n    ```\n\n3.  Configure the database:\n\n    - The application uses PostgreSQL by default. You can configure the database connection in the `config/db.go` file.\n    - To use a different database, you'll need to update the database connection details and potentially modify the `models/url.go` file.\n\n4.  Set environment variables:\n\n    - Create a `.env` file in the root directory.\n    - Add the following environment variables:\n\n      ```\n      DATABASE_URL=postgresql://username:password@host:port/database\n      PORT=8080\n      ```\n\n5.  Run the application:\n\n    ```bash\n    go run main.go\n    ```\n\n## Usage\n\n1.  Open your web browser and go to `http://localhost:8080` (or the port you configured in the `.env` file).\n2.  Enter the URL you want to shorten in the input field.\n3.  Click the \"Shorten\" button.\n4.  The shortened URL will be displayed on the results page.\n\n## Project Structure\n\n```\n.\n├── .env                    # Environment variables\n├── .gitignore              # Git ignore file\n├── go.mod                  # Go module file\n├── go.sum                  # Go dependencies file\n├── main.go                 # Main application file\n├── readme.md               # This file\n├── config/                 # Configuration files\n│   └── db.go               # Database configuration\n├── controllers/            # Controllers\n│   └── url_controller.go   # URL controller\n├── models/                 # Data models\n│   └── url.go              # URL model\n├── routes/                 # Routes\n│   └── routes.go           # Application routes\n├── static/                 # Static files\n│   └── style.css           # CSS file\n├── views/                  # Templ templates\n│   ├── index_templ.go      # Index template (Go file)\n│   ├── index.templ         # Index template\n│   ├── layout_templ.go     # Layout template (Go file)\n│   ├── layout.templ        # Layout template\n│   ├── list_url_templ.go   # List URL template (Go file)\n│   ├── list_url.templ      # List URL template\n│   ├── result_templ.go     # Result template (Go file)\n│   └── result.templ        # Result template\n└── ...\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbintangyosua%2Fshortenurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbintangyosua%2Fshortenurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbintangyosua%2Fshortenurl/lists"}