modulepackage
0.0.0-20240325103752-2e3a87036a6a
Repository: https://github.com/cmaxk/chirpy.git
Documentation: pkg.go.dev
# README
chirpy
Web server that mimics a popular short-form-messaging platform backend with:
- CRUD operations for messages
- User auth with JWT
- Refresh tokens as extra security layer on top of of JWT
- User login/logout and relevant access permissions
- JSON object to mimic document store for messages and users
To run:
go build -o out && ./out
On re-run:
Either manually delete the previously created database.json file or run: go build -o out && ./out --debug
Testing Endpoints:
1. User creation, login, auth, chirp posting, get chirps:
Creation:
Login:
Post chirp using auth token:
Get Chrips:
2. Chirps Delete:
4. Webhook for premium members:
Creation:
Upgrade using API Key:
Premium feature (is_chirpy_red) activated:
Further features such as:
- not allowing duplicate user creation
- Only user can delete their own tweets
- Admin panel with auto-increment visitor count
- Admin revocation of user access
- API health-check endpoint
- Reading chirps by chirp_id
- If a user should not be allowed to perform a certain task...they won't be able to without correct auth tokens etc.