Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fhasnur/unit-converter
🔁 Unit Converter, simple web application that allows users to convert units such as length, weight, and temperature.
https://github.com/fhasnur/unit-converter
fiber go golang mustache webapp
Last synced: 15 days ago
JSON representation
🔁 Unit Converter, simple web application that allows users to convert units such as length, weight, and temperature.
- Host: GitHub
- URL: https://github.com/fhasnur/unit-converter
- Owner: fhasnur
- License: mit
- Created: 2024-11-25T14:54:52.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-10T15:30:38.000Z (30 days ago)
- Last Synced: 2024-12-10T16:38:32.416Z (30 days ago)
- Topics: fiber, go, golang, mustache, webapp
- Language: Go
- Homepage: https://unit-converter.up.railway.app
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unit Converter
![Unit Converter Screenshot](assets/unit-converter.png)
**Unit Converter** is a simple web application that allows users to convert units such as **length**, **weight**, and **temperature**. The app is built using [Go Fiber](https://gofiber.io/) as the web framework and [Mustache](https://mustache.github.io/) as the template engine. The sample solution for the [unit-converter](https://roadmap.sh/projects/unit-converter) challenge from [roadmap.sh](https://roadmap.sh/).
## Features
- **Length Conversion**: Millimeter, centimeter, meter, kilometer, inch, foot, yard, mile.
- **Weight Conversion**: Milligram, gram, kilogram, ounce, pound.
- **Temperature Conversion**: Celsius, Fahrenheit, Kelvin.
- Simple and responsive user interface.
- Retains results within their respective tabs without reloading the page.## Technologies Used
- **Programming Language**: Go
- **Web Framework**: Fiber
- **Template Engine**: Mustache
- **UI Interaction & Styling**: JS, CSS## Installation
Clone this repository to your local directory:
```bash
git clone https://github.com/fhasnur/unit-converter.git
cd unit-converter
```Install all required dependencies:
```bash
go mod tidy
```Run the application:
```bash
go run main.go
```Open the application in your browser at:
```bash
http://localhost:3000
```## Project Structure
```bash
unit-converter/
├── assets/
│ └── unit-converter.png # Screenshot of the Unit Converter
├── internal/
│ ├── converter/ # Unit conversion logic
│ │ ├── length.go
│ │ ├── weight.go
│ │ └── temperature.go
│ ├── data/
│ │ └── units.go # Unit data for display
│ └── handler/
│ └── root.go # Main page handler
├── templates/
│ └── index.mustache # Main HTML template
├── static/
│ ├── style.css # Styling
│ └── script.js # User interaction logic
├── .env # Environment variables (for production)
├── .env.example # Example of environment variables
├── .gitignore # Files and directories to be ignored by Git
├── Dockerfile # Docker configuration
├── railway.json # Railway deployment configuration
├── go.mod # Go module information
├── go.sum # Dependency checksum
├── main.go # Application entry point
└── README.md # Project documentation
```## Contribution
Contributions are welcome. To contribute, fork this repository, create a new branch, and submit a pull request.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.