Snippet Saver

A snippet organizer for developers.

See Code

About

Snippet Saver is an app I developed from scratch to save, organize, and share code snippets. It is a full-stack MERN application with JWT authentication.

Users can search a database of publicly avaliable snippets, like their favorites, create public and private snippets, edit snippets, and delete snippets. This authentication system stores a JWT in local storage and checks it each time a protected route is requested. A password reset token can be sent to valid email addresses using Nodemailer when a password reset request is sent.

I read 'Clean Code' by Robert Martin as I was writing the backend and used this project as a sandbox to experiment with test-driven development. I found that mocking API calls using Jest, then adding code to the express server to respond to the mocked calls resulted in a clean, stable workflow. By creating code in a way that offers near-complete test coverage, I had confidence as I refactored.

While relatively simple, this app has proven to be a useful code organizer as I continue to grow as a developer. Additionally, Snippet Saver provides a solid framework for future apps that require authentication.

Technologies

This app uses React, ES6 JavaScript, NodeJS, MongoDB, Mongoose, Express, and Jest. It is hosted on an AWS linux instance. The CI/CD pipeline uses AWS CodeBuild and CodeDeploy to build, run automated tests, and restart the server upon a push to the master branch.