Skip to content

This typescript project utilizes browser local storage to replicate the functions of a database. The simple frontend UI plays with the idea of using a database to store information about different pigs on a farm, utilizing AJAX to create dynamic forms.

Notifications You must be signed in to change notification settings

Daksh2060/local-storage-farm-database

Repository files navigation

Local Storage Database in TypeScript

This typescript project acts as a demo of the usage of Typescript to create data objects and store them in a front-end "serverless" database with browser local storage. The database is aimed at hypothetical farmers who may want to keep track of their different species of Pigs, with there being four example species included. Each pig can have different characteristics, and corresponding values to these traits, so each entry is stored as a unique object. The program makes use of JSON parsing to stringify and decode objects to and from local storage. The TypeScript must be compiled using tsc and is run through an HTML interface for the database, but has been pre-compiled to JavaScript.

Features

  • Database Sorting: The database automatically sorts the Pigs by their species and color, so users don't need to worry about organizing.

  • Class Interface: The project uses a Class interface to allow users to manage and keep track of several similar pigs without mixing them up.

  • JSON Parsing: Objects are parsed out of local storage on every refresh, and added into storage on every update to the database, allowing users to quickly leave and enter the program without losing any stored data.

  • AJAX Form: Allows users to dynamically adjust their form for different corresponding pig species without having to update the rest of the web page.

How does it work?

Installation and Use

Follow these steps to set up and run the Local Storage Database:

  1. Clone the repository to your local machine:

    git clone 

Contact

Feel free to reach out if you have any questions, suggestions, or feedback:

About

This typescript project utilizes browser local storage to replicate the functions of a database. The simple frontend UI plays with the idea of using a database to store information about different pigs on a farm, utilizing AJAX to create dynamic forms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published