A simple URL shortener implemented in Go using Fiber and MongoDB and a frontend with GO (using Fiber) HTML templates.
- Routes post request at
/new-url
- Check if a short URL already exists before creating a new one.
- All setup (for now)
- Actually generate a random but short link to use instead of supplying one
- Create a handler file to manage routes
- HTML Template for the frontend
- Home Page
- Placeholder for now, gonna add some screenshots and a brief description of the project once TailwindCSS is implemented
- Stats Page
- Submit URL Page
- Search Stuff
- Needs some serious styling
- 404 Page
- General Styling - Chose to go with a minimal design instead and used Water.css.
- There's still some formatting I need to fix.
- Blog Page
- Placeholder for now, going to add some blog posts about the project and other stuff once it's finished.
- About Page
- Some general styling will fix this page up.
- Home Page
- Create routing package
- Auth handling is actual finished now, but needs adjusted now that it's not just an API.
- Save referer data for a little bit more insight into clicks
- Switching to Tailwindcss (i'll use the cdn for now, but create my own imports laters)
- Removed blogs (i really don't know why I added it)
- Currently /stats/:id loads referers whether you're logged in on the owner account or not.
- Customize toasts for errors and success messages
- Setup middleware for dashboard and retrieve URLs associated with user
- Found a bug with the stats.html page. When you search for the link it works fine but going from dashboard uses the wrong url for the link to the short url. I think I may just change this to a button that copies the link to the clipboard.
- Decided on server side for graphs.
- I have to decide whether static and server-side with go or dynamic and client-side with JS
- Signed up user upgrades
- Custom short URLs
- Need to check this. Right now it's just whatever they type which could cause duplicates.
- Custom referer data
- Custom tags to categorize for analytics
- Delete URLs
- Custom short URLs
- Redo the home page. Finally add screenshots and more details.
- Switch to GORM with with postgres
-
Clone the Repository:
git clone https://github.com/Nedinator/rbbt.git cd rbbt
-
Install Dependencies Make sure you have Go installed. Then, run:
go mod tidy
-
Configure app: There's some environment variables you'll need. Maybe someone can write a package to handle this better who knows.
export DOMAIN=127.0.0.1:3000 export DB_DSN=get-a-postgres-db export JWT_SECRET=this_can_be_anything_just_keep_it_the_same_or_users_cant_login
-
Run the Application:
air
-
Or Build the Application
go build -o builds/ribbit . ./builds/ribbit