Skip to content

Snippetbox is a simple web application for managing code snippets, built with Go. It features user authentication, form validation, secure password handling, and CSRF protection, following the tutorial from *Let's Go* by Alex Edwards.

Notifications You must be signed in to change notification settings

ashab-k/snippetbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snippetbox

Snippetbox is a web application for managing code snippets, built using Go and based on the tutorial from Let's Go by Alex Edwards. The project demonstrates various web development concepts, including user authentication, form validation, secure password handling, and CSRF protection.

This application allows users to sign up, log in, and manage their snippets, with a focus on secure and scalable design.

Features

  • User Authentication: Users can sign up, log in, and access their snippets.
  • Form Validation: Ensures that user input is correct before processing (e.g., email format, password strength).
  • Error Handling: Comprehensive error handling with detailed feedback for the user.
  • CSRF Protection: Prevents cross-site request forgery attacks.
  • Session Management: Persistent login sessions with secure cookies.
  • Secure Password Storage: Passwords are stored securely using bcrypt hashing.
  • Database Interaction: Uses MySQL for persistent storage of users and snippets.
  • HTTP Redirects: Handles HTTP redirects with proper status codes (e.g., 303 See Other after form submissions).
  • Flash Messages: Provides feedback to the user after form submissions.

Installation

To run the Snippetbox project locally, follow these steps:

1. Clone the Repository

git clone https://github.com/ashab-k/snippetbox.git
cd snippetbox

2. Run using docker

docker compose up --build

About

Snippetbox is a simple web application for managing code snippets, built with Go. It features user authentication, form validation, secure password handling, and CSRF protection, following the tutorial from *Let's Go* by Alex Edwards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published