diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5696d95
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,52 @@
+node_modules/
+
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# SonarLint plugin
+.idea/sonarlint/
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Database
+messages.json
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..b58b603
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,5 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..1a2fb33
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/cs4241_assignment_2.iml b/.idea/cs4241_assignment_2.iml
new file mode 100644
index 0000000..0c8867d
--- /dev/null
+++ b/.idea/cs4241_assignment_2.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
new file mode 100644
index 0000000..d23208f
--- /dev/null
+++ b/.idea/jsLibraryMappings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..eb9b380
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index f229958..6c731b8 100644
--- a/README.md
+++ b/README.md
@@ -1,98 +1,51 @@
Assignment 2 - Short Stack: Basic Two-tier Web Application using HTML/CSS/JS and Node.js
===
-Due: September 8th, by 11:59 AM.
+## Message Board
+_Message Board_ is a web app that lets users post messages with whatever color they choose. They can post messages and
+delete any other messages on the server.
-This assignment aims to introduce you to creating a prototype two-tiered web application.
-Your application will include the use of HTML, CSS, JavaScript, and Node.js functionality, with active communication between the client and the server over the life of a user session.
+By Cameron Jacobson
-Baseline Requirements
----
-
-There is a large range of application areas and possibilities that meet these baseline requirements.
-Try to make your application do something useful! A todo list, storing / retrieving high scores for a very simple game... have a little fun with it.
-
-Your application is required to implement the following functionalities:
-
-- a `Server` which not only serves files, but also maintains a tabular dataset with 3 or more fields related to your application
-- a `Results` functionality which shows the entire dataset residing in the server's memory
-- a `Form/Entry` functionality which allows a user to add, modify, or delete (complete at least two) data items residing in the server's memory
-- a `Server Logic` which, upon receiving new or modified "incoming" data, includes and uses a function that adds at least one additional derived field to this incoming data before integrating it with the existing dataset
-- the `Derived field` for a new row of data must be computed based on fields already existing in the row.
-For example, a `todo` dataset with `task`, `priority`, and `creation_date` may generate a new field `deadline` by looking at `creation_date` and `priority`
-
-Your application is required to demonstrate the use of the following concepts:
-
-HTML:
-- One or more [HTML Forms](https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms), with any combination of form tags appropriate for the user input portion of the application
-- A results page displaying all data currently available on the server. You will most likely use a `
` tag for this, but `
` or `` could also work and might be simpler to work with. Alternatively, you can create a single-page app (see Technical Acheivements) but this is not a requirement.
-- All pages should [validate](https://validator.w3.org)
-- If your app contains multple pages, they should all be accessible from the homepage (index.html)
-
-CSS:
-- CSS styling of the primary visual elements in the application
-- Various CSS Selector functionality must be demonstrated:
- - Element selectors
- - ID selectors
- - Class selectors
-- CSS positioning and styling of the primary visual elements in the application:
- - Use of either a CSS grid or flexbox for layout
- - Rules defining fonts for all text used; no default fonts! Be sure to use a web safe font or a font from a web service like [Google Fonts](http://fonts.google.com/)
-
-- CSS defined in a maintainable, readable form, in external stylesheets
-
-JavaScript:
-- At minimum, a small amount of front-end JavaScript to get / fetch data from the server; a sample is provided in this repository.
-
-Node.js:
-- An HTTP Server that delivers all necessary files and data for the application, and also creates the required `Derived Fields` in your data.
-A starting point is provided in this repository.
-
-Deliverables
----
-
-Do the following to complete this assignment and acheive a base grade of 85%:
-
-1. Fork the starting project code (make sure to fork the 2022 repo!). This repo contains some starter code that may be used or discarded as needed.
-2. Implement your project with the above requirements.
-3. Test your project to make sure that when someone goes to your main page, it displays correctly.
-4. Deploy your project to Glitch, and fill in the appropriate fields in your package.json file.
-5. Ensure that your project has the proper naming scheme `a2-yourGithubUsername` so we can find it.
-6. Modify the README to the specifications below, and delete all of the instructions originally found in this README.
-7. Create and submit a Pull Request to the original repo. Label the pull request as follows: a2-gitusername-firstname-lastname
-
-Acheivements
----
-
-Below are suggested technical and design achievements. You can use these to help boost your grade up to an A and customize the assignment to your personal interests. These are recommended acheivements, but feel free to create/implement your own... just make sure you thoroughly describe what you did in your README and why it was challenging. ALL ACHIEVEMENTS MUST BE DESCRIBED IN YOUR README IN ORDER TO GET CREDIT FOR THEM.
-
-*Technical*
-- (10 points) Create a single-page app that both provides a form for users to submit data and always shows the current state of the server-side data. To put it another way, when the user submits data, the server should respond sending back the updated data (including the derived field calculated on the server) and the client should then update its data display.
-
-*Design/UX*
-- (5 points per person, with a max of 10 points) Test your user interface with other students in the class. Define a specific task for them to complete (ideally something short that takes <10 minutes), and then use the [think-aloud protocol](https://en.wikipedia.org/wiki/Think_aloud_protocol) to obtain feedback on your design (talk-aloud is also find). Important considerations when designing your study:
-
-1. Make sure you start the study by clearly stating the task that you expect your user to accomplish.
-2. You shouldn't provide any verbal instructions on how to use your interface / accomplish the task you give them. Make sure that your interface is clear enough that users can figure it out without any instruction, or provide text instructions from within the interface itself.
-3. If users get stuck to the point where they give up, you can then provde instruction so that the study can continue, but make sure to discuss this in your README. You won't lose any points for this... all feedback is good feedback!
-
-You'll need to use sometype of collaborative software that will enable you both to see the test subject's screen and listen to their voice as they describe their thoughts. After completing each study, briefly (one to two sentences for each question) address the following in your README:
-
-1. Provide the last name of each student you conduct the evaluation with.
-2. What problems did the user have with your design?
-3. What comments did they make that surprised you?
-4. What would you change about the interface based on their feedback?
-
-*You do not need to actually make changes based on their feedback*. This acheivement is designed to help gain experience testing user interfaces. If you run two user studies, you should answer two sets of questions.
-
-Sample Readme (delete the above when you're ready to submit, and modify the below so with your links and descriptions)
----
-
-## Your Web Application Title
-Include a very brief summary of your project here. Be sure to include the CSS positioning technique you used, and any required instructions to use your application.
+Link to site: https://a2-cjacobson.glitch.me/
## Technical Achievements
-- **Tech Achievement 1**: Using a combination of...
-
-### Design/Evaluation Achievements
-- **Design Achievement 1**:
+- **Database**: Uses a nedb database to store messages in the server
+- **Results**: Uses a `GET` request at the beginning of every page load to get all previous messages
+- **Form/entry**: A form is used to submit new messages with a message and color to the database.
+ - There is a 🗑 button next to each message that sends a `DELETE` request to the server for that message.
+- **Server Logic**: The server updates the date of the received data to log exactly when the server wrote the message
+to the database.
+ - When messages are sent to the client, they are automatically sorted in the server by the date they were posted.
+- **Derived Field**: The time is updated on the server when the data is written. Responses to Queries from the server
+are also sorted by time serverside
+- **Clientside Javascript**: Javascript on the client is used for several things
+ - Automatically adjust the css height of the messages element to ensure it fits between the top and bottom bar.
+ - Clears the input text box after a message has been submitted
+ - Automatically calls `GET` on the server when the webpage is loaded.
+ - After getting messages from the server, javascript on the site renders the data to message boxes with css styling
+ - The color of these elements are set dynamically based on the received color value
+
+## Design/Evaluation Achievements
+### HTML
+- **HTML Form**: An **HTML Form** is used to accept a user submitted message with a color.
+- **Results page**: there is a feed of messages that displays all user messages on the server so far.
+- **Validation** Pages validate 👍 -> https://validator.w3.org/nu/?doc=https%3A%2F%2Fa2-cjacobson.glitch.me%2F
+
+### CSS
+- **Element Selectors**: Element selectors are used to fix the height of the page, remove margins, and add entry
+animations for most elements.
+- **ID Selectors**: ID selectors are used for referencing individual sections in the webpage.
+- **Class selectors**: Several classes are used to style messages and organize site content
+- **Google Font**: _Roboto_ was taken from Google Fonts and used for all text content on the site.
+
+### Evaluations
+- Aaron Waldman
+ - He stress-tested the apps to figure out if exotic ascii characters could be used
+ - He wanted more frequent refreshes from the database
+ - Based on his feedback, I implemented full updates from the database whenever a change was made or whenever the
+ lost then gained focus
+- Michael O'Connor
+ - Michael tested how long the strings that could be input were
+ - He found that long single-word messages would push the delete button off-screen
+ - In response, I enabled wrapping single-word strings to the next line in messages
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..78759ff
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,243 @@
+{
+ "name": "cs4241_assignment_2",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "dependencies": {
+ "@types/nedb": "^1.8.12",
+ "mime": "^2.4.4",
+ "nedb": "^1.8.0"
+ },
+ "devDependencies": {
+ "@types/filesystem": "^0.0.32",
+ "@types/node": "^18.7.14",
+ "typescript": "^4.8.2"
+ }
+ },
+ "node_modules/@types/filesystem": {
+ "version": "0.0.32",
+ "resolved": "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.32.tgz",
+ "integrity": "sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/filewriter": "*"
+ }
+ },
+ "node_modules/@types/filewriter": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.29.tgz",
+ "integrity": "sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ==",
+ "dev": true
+ },
+ "node_modules/@types/nedb": {
+ "version": "1.8.12",
+ "resolved": "https://registry.npmjs.org/@types/nedb/-/nedb-1.8.12.tgz",
+ "integrity": "sha512-ICDoQMORMjOSqfNFXT4ENXfwwCir1BPblXNm0SPH7C4Q10ou+pvVagcFAJ+rrzf3A47tGU4K/KbzKu7wO9j45Q==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "18.7.14",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.14.tgz",
+ "integrity": "sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA=="
+ },
+ "node_modules/async": {
+ "version": "0.2.10",
+ "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
+ "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ=="
+ },
+ "node_modules/binary-search-tree": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz",
+ "integrity": "sha512-CvNVKS6iXagL1uGwLagSXz1hzSMezxOuGnFi5FHGKqaTO3nPPWrAbyALUzK640j+xOTVm7lzD9YP8W1f/gvUdw==",
+ "dependencies": {
+ "underscore": "~1.4.4"
+ }
+ },
+ "node_modules/immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="
+ },
+ "node_modules/lie": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
+ "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==",
+ "dependencies": {
+ "immediate": "~3.0.5"
+ }
+ },
+ "node_modules/localforage": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
+ "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
+ "dependencies": {
+ "lie": "3.1.1"
+ }
+ },
+ "node_modules/mime": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
+ "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
+ },
+ "node_modules/mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "dependencies": {
+ "minimist": "^1.2.6"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ }
+ },
+ "node_modules/nedb": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz",
+ "integrity": "sha512-ip7BJdyb5m+86ZbSb4y10FCCW9g35+U8bDRrZlAfCI6m4dKwEsQ5M52grcDcVK4Vm/vnPlDLywkyo3GliEkb5A==",
+ "dependencies": {
+ "async": "0.2.10",
+ "binary-search-tree": "0.2.5",
+ "localforage": "^1.3.0",
+ "mkdirp": "~0.5.1",
+ "underscore": "~1.4.4"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "4.8.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
+ "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=4.2.0"
+ }
+ },
+ "node_modules/underscore": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
+ "integrity": "sha512-ZqGrAgaqqZM7LGRzNjLnw5elevWb5M8LEoDMadxIW3OWbcv72wMMgKdwOKpd5Fqxe8choLD8HN3iSj3TUh/giQ=="
+ }
+ },
+ "dependencies": {
+ "@types/filesystem": {
+ "version": "0.0.32",
+ "resolved": "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.32.tgz",
+ "integrity": "sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ==",
+ "dev": true,
+ "requires": {
+ "@types/filewriter": "*"
+ }
+ },
+ "@types/filewriter": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.29.tgz",
+ "integrity": "sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ==",
+ "dev": true
+ },
+ "@types/nedb": {
+ "version": "1.8.12",
+ "resolved": "https://registry.npmjs.org/@types/nedb/-/nedb-1.8.12.tgz",
+ "integrity": "sha512-ICDoQMORMjOSqfNFXT4ENXfwwCir1BPblXNm0SPH7C4Q10ou+pvVagcFAJ+rrzf3A47tGU4K/KbzKu7wO9j45Q==",
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/node": {
+ "version": "18.7.14",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.14.tgz",
+ "integrity": "sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA=="
+ },
+ "async": {
+ "version": "0.2.10",
+ "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
+ "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ=="
+ },
+ "binary-search-tree": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz",
+ "integrity": "sha512-CvNVKS6iXagL1uGwLagSXz1hzSMezxOuGnFi5FHGKqaTO3nPPWrAbyALUzK640j+xOTVm7lzD9YP8W1f/gvUdw==",
+ "requires": {
+ "underscore": "~1.4.4"
+ }
+ },
+ "immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="
+ },
+ "lie": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
+ "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==",
+ "requires": {
+ "immediate": "~3.0.5"
+ }
+ },
+ "localforage": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
+ "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
+ "requires": {
+ "lie": "3.1.1"
+ }
+ },
+ "mime": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
+ "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
+ },
+ "minimist": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
+ },
+ "mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "requires": {
+ "minimist": "^1.2.6"
+ }
+ },
+ "nedb": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz",
+ "integrity": "sha512-ip7BJdyb5m+86ZbSb4y10FCCW9g35+U8bDRrZlAfCI6m4dKwEsQ5M52grcDcVK4Vm/vnPlDLywkyo3GliEkb5A==",
+ "requires": {
+ "async": "0.2.10",
+ "binary-search-tree": "0.2.5",
+ "localforage": "^1.3.0",
+ "mkdirp": "~0.5.1",
+ "underscore": "~1.4.4"
+ }
+ },
+ "typescript": {
+ "version": "4.8.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
+ "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
+ "dev": true
+ },
+ "underscore": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
+ "integrity": "sha512-ZqGrAgaqqZM7LGRzNjLnw5elevWb5M8LEoDMadxIW3OWbcv72wMMgKdwOKpd5Fqxe8choLD8HN3iSj3TUh/giQ=="
+ }
+ }
+}
diff --git a/package.json b/package.json
index 988f135..8423636 100644
--- a/package.json
+++ b/package.json
@@ -4,9 +4,16 @@
"description": "",
"author": "",
"scripts": {
- "start": "node server.improved.js"
+ "start": "node server/server.improved.js"
},
"dependencies": {
- "mime": "^2.4.4"
+ "@types/nedb": "^1.8.12",
+ "mime": "^2.4.4",
+ "nedb": "^1.8.0"
+ },
+ "devDependencies": {
+ "@types/filesystem": "^0.0.32",
+ "@types/node": "^18.7.14",
+ "typescript": "^4.8.2"
}
}
diff --git a/public/css/style.css b/public/css/style.css
deleted file mode 100644
index d5f842a..0000000
--- a/public/css/style.css
+++ /dev/null
@@ -1 +0,0 @@
-/*Style your own assignment! This is fun! */
\ No newline at end of file
diff --git a/public/css/styles.css b/public/css/styles.css
new file mode 100644
index 0000000..f1b9e9f
--- /dev/null
+++ b/public/css/styles.css
@@ -0,0 +1,139 @@
+/*fonts*/
+@import
+url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
+
+* {
+ font-family: 'Roboto', sans-serif;
+}
+
+/*Global fonts*/
+h1 {
+ font-size: 60pt;
+}
+
+h1, h2, h3 {
+ font-weight: 100;
+}
+
+/*Body*/
+html, body {
+ height: 100vh;
+ overflow: visible;
+}
+
+body {
+ margin: 0;
+ background-color: #ABCADE;
+ display: flex;
+ flex-direction: column;
+}
+
+/*Animate a fade-in entry for every site element*/
+:not(body, div, section, html) {
+ animation: loadin 1s ease forwards;
+}
+
+@keyframes loadin {
+ from {
+ opacity: 0;
+ transform: translateY(10pt);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0pt);
+ }
+}
+
+/*Section Styling*/
+section {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+section:nth-child(odd) {
+ background-color: #A0BED1;
+ padding: 20pt 0pt 20pt 0pt;
+}
+
+section:nth-child(even) {
+ background-color: #ABCADE;
+ padding: 20pt 0pt 20pt 0pt;
+}
+
+/*Organizational*/
+.content {
+ width: clamp(400px, 67%, 1280px);
+}
+
+.hbox {
+ display: flex;
+ flex-direction: row;
+}
+
+.vbox {
+ display: flex;
+ flex-direction: column;
+}
+
+.flex-center {
+ display: flex;
+ align-content: center;
+ justify-items: center;
+}
+
+hr {
+ margin: 40pt auto;
+}
+
+/*Message styles*/
+.message {
+ padding: 10px 20px;
+ border-radius: 5px;
+ margin: 5px 0;
+ justify-content: space-between;
+}
+
+.message > p {
+ max-width: 70%;
+ word-wrap: break-word;
+}
+
+.delete-button {
+ border-radius: 50%;
+ border-color: transparent;
+ background-color: red;
+ margin-left: 20px;
+ width: 50px;
+ height: 50px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+#messages-section {
+ overflow-y: scroll;
+ height: 65vh;
+}
+
+/*Form styles*/
+#input-section {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+}
+
+#new-note-form > * {
+ margin: 0 5px;
+}
+
+#message-input {
+ flex-grow: 1;
+}
+
+#submit {
+ width: auto;
+ padding: 2px 20px;
+ margin-left: 10%;
+}
diff --git a/public/index.html b/public/index.html
index c56d620..ca429e2 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1,41 +1,42 @@
-
- CS4241 Assignment 2
-
-
-
-