EncurtaGo
EncurtaGo is a URL shortener built with Go (Gin Gonic) for the backend and Vite with React for the frontend. It provides a RESTful API, a fast frontend interface, and a PostgreSQL database for persistent URL storage.
The application is live at: EncurtaGo.
π Features
- URL Shortening β Convert long URLs into short, shareable links.
- REST API β Provides endpoints for creating and retrieving shortened URLs.
- Frontend with Vite & React β Fast, modern UI for users.
- PostgreSQL Storage β Persistent URL mappings using a relational database.
- Migrations with Tern β Efficient database version control.
- Code Generation with SQLC β Type-safe queries and better performance.
- Docker Support β Easy deployment and environment consistency.
π οΈ Technologies Used
Backend:
- Go β Fast and efficient backend service.
- Gin Gonic β Lightweight and high-performance web framework.
- SQLC β Type-safe SQL query generation.
- PostgreSQL β Relational database for storing URLs.
- Tern β Database migration tool.
- Docker β Containerized environment for deployment.
Frontend:
- Vite β Fast development build tool.
- React β Frontend library for dynamic UI.
- TypeScript β Ensures type safety and maintainability.
- Tailwind CSS β Utility-first CSS for styling.
π Project Structure
encurtago/
βββ client/ # Frontend (Vite + React)
βββ cmd/api/ # Backend (Gin Gonic API)
βββ internal/ # Internal Go modules and utilities
βββ test/ # Test cases
βββ Dockerfile # Docker container setup
βββ docker-compose.yml # Docker Compose configuration
βββ .env.example # Example environment variables
βββ Makefile # Build automation commands
π§ Setup & Installation
1οΈβ£ Clone the Repository
git clone https://github.com/gabehamasaki/encurtago.git
cd encurtago
2οΈβ£ Set Up Environment Variables
3οΈβ£ Run the Project with Docker
docker-compose up --build
This command builds and starts the services defined in docker-compose.yml.
4οΈβ£ Access the Application
π§ͺ Running Tests
To run backend tests:
go test ./...
π€ Contributing
Contributions are welcome! Feel free to:
- Report issues
- Submit feature requests
- Fork the repository and create pull requests
π License
This project is licensed under the MIT License. See the LICENSE file for more details.
Built with β€οΈ by Gabriel Hamasaki.