Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christiankopac/url_shortener
🌐 URL Shortener 🩳
https://github.com/christiankopac/url_shortener
bun drizzle-orm hono htmx turso
Last synced: 8 days ago
JSON representation
🌐 URL Shortener 🩳
- Host: GitHub
- URL: https://github.com/christiankopac/url_shortener
- Owner: christiankopac
- License: mit
- Created: 2024-11-16T15:25:31.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-16T16:24:10.000Z (2 months ago)
- Last Synced: 2024-11-16T16:32:03.560Z (2 months ago)
- Topics: bun, drizzle-orm, hono, htmx, turso
- Language: TypeScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# URL Shortener
A simple URL shortening service built with Bun. Transforms long URLs into shorter, more manageable links.
## Requirements
- [Bun](https://bun.sh) v1.1.33 or higher
## Installation
Clone the repository and install dependencies:
```bash
git clone
cd
bun install
```## Usage
To run the URL shortener:
1. Set the environment variables in `.env`:
```env
DATABASE_URL=
DATABASE_AUTH_TOKEN=
```2. Start the application:
```bash
bun run start
```## Features
- Basic authentication (register, login, logout)
- Shortened URL dashboard and simple analytics (click count)## Project Structure
```
src
|- controllers
|- db
|- drizzle
|- middleware
|- routes
|- services
|- utils
|- views
|- components
|- layout
|- pages
```### Directories
- `src/controllers`: Contains the logic for handling requests and responses.
- `src/db`: Database schema and setup.
- `src/drizzle`: ORM configuration and setup.
- `src/middleware`: Middleware functions for request processing.
- `src/routes`: Route definitions and handlers.
- `src/services`: Business logic and services.
- `src/utils`: Utility functions and helpers.
- `src/views`: View components for rendering HTML.
- `components`: Reusable UI components.
- `layout`: Layout components.
- `pages`: Page components.## Contributing
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Make your changes.
4. Commit your changes (`git commit -am 'Add new feature'`).
5. Push to the branch (`git push origin feature-branch`).
6. Create a new Pull Request.## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.