Categorygithub.com/CMaxK/chirpy
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: image Login: image Post chirp using auth token: image image image Get Chrips: image

2. Chirps Delete:

image

4. Webhook for premium members:

Creation: image Upgrade using API Key: image image Premium feature (is_chirpy_red) activated: image

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.

# Packages

No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author