A full-stack web application that allows users to securely share secret notes. The application features a Go backend using the Gin framework, a Vue.js frontend, and an SQLite database.
- Users can create an account, login and logout.
- After logging in, user can create note and view his/her notes without incrementing the views.
- Secret notes are created with a user-defined expiration time and a maximum view limit.
- Notes are permanently deleted after either the expiration time is reached or the maximum view count is exceeded.
- Note views gets incremented when accessing the note via its automatically generated url.
- A 404 error page is displayed when attempting to access a deleted note or any oother unrecognized url.
- Rate limiting is applied to prevent abuse
- POST /note: Creates a new note. Requires authorization.
- GET /note/:note_url: Retrieves a note by URL.
- POST /users: Creates a new user.
- POST /login: Logs in a user.
- GET /notes: Retrieves all notes for the logged-in user. Requires authorization.
- POST /logout: Logs out the user. Requires authorization.
cd frontend
npm run dev
cd backend
go run cmd/main.go -p 8080 -d test.db
docker build -t backend -f backend/Dockerfile backend
docker run -p 8080:8080 backend
docker build -t frontend -f frontend/Dockerfile frontend
docker run -p 5173:5173 frontend
docker-compose up --build
sudo dockerd &
docker compose up
docker-compose down