{"id":21009451,"url":"https://github.com/memgonzales/linquiztics","last_synced_at":"2025-05-15T02:33:10.435Z","repository":{"id":65041091,"uuid":"369940721","full_name":"memgonzales/linquiztics","owner":"memgonzales","description":"Language learning web application that allows users to create their own quizzes and to answer those made by the community of users. Features incentivization dynamics designed to gamify learning through customized quiz suggestions, experience points, streaks, leagues, and a global leaderboard.","archived":false,"fork":false,"pushed_at":"2022-12-22T15:10:02.000Z","size":5376,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T11:45:16.968Z","etag":null,"topics":["educational","handlebars","javascript","mongodb","mongoose","node-js","nodejs","password-hashing","quiz-website","session-management","web-development","website"],"latest_commit_sha":null,"homepage":"https://linquiztics.up.railway.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memgonzales.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-23T01:54:33.000Z","updated_at":"2024-03-22T06:58:15.000Z","dependencies_parsed_at":"2022-12-25T19:19:53.169Z","dependency_job_id":null,"html_url":"https://github.com/memgonzales/linquiztics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgonzales%2Flinquiztics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgonzales%2Flinquiztics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgonzales%2Flinquiztics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgonzales%2Flinquiztics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memgonzales","download_url":"https://codeload.github.com/memgonzales/linquiztics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225324080,"owners_count":17456460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["educational","handlebars","javascript","mongodb","mongoose","node-js","nodejs","password-hashing","quiz-website","session-management","web-development","website"],"created_at":"2024-11-19T09:16:52.812Z","updated_at":"2024-11-19T09:16:53.496Z","avatar_url":"https://github.com/memgonzales.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linquiztics\n![badge][badge-html5]\n![badge][badge-bootstrap]\n![badge][badge-js]\n![badge][badge-jquery]\n![badge][badge-mongodb]\n![badge][badge-express]\n![badge][badge-nodejs]\n\nLinquiztics \u0026mdash; a play on \u003ci\u003elinguistics\u003c/i\u003e and \u003ci\u003equiz\u003c/i\u003e \u0026mdash; is a language learning web application that allows users to create their own quizzes and to answer those made by the community of users. It also features incentivization dynamics designed to gamify learning through customized quiz suggestions, experience points, streaks, leagues, and a global leaderboard. \n\n💡 **UPDATE (12/22/2022): With the shutting down of free Heroku services, we have migrated to Railway: https://linquiztics.up.railway.app/**\n\n***Kindly enter a valid email address during the creation of an account. The web application will send an email to this registered email address after the account has been created and in the event of a password change.***\n\n## Task\n**Linquiztics** is the major course output in a web development class under Mr. Arren C. Antioquia of the Department of Software Technology, De La Salle University. The students are tasked to create a web application of their choice, provided that it satisfies the minimum requirement of supporting the following operations: \u003ci\u003elog in, log out, register, CRUD (create, read, update, and delete),\u003c/i\u003e and \u003ci\u003esearch\u003c/i\u003e. The application development is divided into three phases:\n\n| Phase | Duration | Description |\n| --- | --- | --- |\n| 1 | 4 weeks | Implementation of the front-end view using HTML, CSS, and JavaScript (with hardcoded life-like data for each applicable feature) |\n| 2 | 7 weeks |  Implementation of the back-end logic, including database operations (MongoDB), page rendering using a template engine (preferably Handlebars), and local server hosting (Node.js) |\n| 3 | 3 weeks, coinciding with the last weeks of Phase 2 | Implementation of session management and password hashing, refactoring of the project following the MVC architectural pattern, and deployment of the application |\n\nThis project consists of the following folders:\n\n| Folder | Description |\n| --- | --- |\n| \u003ca href = \"https://github.com/memgonzales/linquiztics/tree/master/controllers\"\u003e\u003ccode\u003econtrollers\u003c/code\u003e\u003c/a\u003e | Contains the JavaScript files that define callback functions for client-side requests |\n| \u003ca href = \"https://github.com/memgonzales/linquiztics/tree/master/helpers\"\u003e\u003ccode\u003ehelpers\u003c/code\u003e | Contains the JavaScript files that define helper functions for front-end display and server-side validation | \n| \u003ca href = \"https://github.com/memgonzales/linquiztics/tree/master/misc\"\u003e\u003ccode\u003emisc\u003c/code\u003e\u003c/a\u003e | Contains the JavaScript files for initial database population |\n| \u003ca href = \"https://github.com/memgonzales/linquiztics/tree/master/models\"\u003e\u003ccode\u003emodels\u003c/code\u003e\u003c/a\u003e | Contains the JavaScript files for database modeling and access | \n| \u003ca href = \"https://github.com/memgonzales/linquiztics/tree/master/public\"\u003e\u003ccode\u003epublic\u003c/code\u003e\u003c/a\u003e | Contains the static CSS and JavaScript files, as well as the project assets (images and audio files), for front-end display |\n| \u003ca href = \"https://github.com/memgonzales/linquiztics/tree/master/routes\"\u003e\u003ccode\u003eroutes\u003c/code\u003e\u003c/a\u003e | Contains the JavaScript file that defines the server response to each HTTP method request |\n| \u003ca href = \"https://github.com/memgonzales/linquiztics/tree/master/views\"\u003e\u003ccode\u003eviews\u003c/code\u003e\u003c/a\u003e | Contains the Handlebars template files to be rendered and displayed upon request |\n\nIt also includes the following files:\n\n| File | Description |\n| --- | --- |\n| \u003ca href = \"https://github.com/memgonzales/linquiztics/blob/master/package-lock.json\"\u003e\u003ccode\u003epackage-lock.json\u003c/code\u003e\u003c/a\u003e and \u003ca href = \"https://github.com/memgonzales/linquiztics/blob/master/package.json\"\u003e\u003ccode\u003epackage.json\u003c/code\u003e\u003c/a\u003e | Store information on the project dependencies |\n| \u003ca href = \"https://github.com/memgonzales/linquiztics/blob/master/index.js\"\u003e\u003ccode\u003eindex.js\u003c/code\u003e\u003c/a\u003e | Entry point of the web application |\n\nThe complete project specifications can be found in the file \u003ca href = \"https://github.com/memgonzales/linquiztics/blob/master/Proposed%20Specifications.pdf\"\u003e\u003ccode\u003eProposed Specifications.pdf\u003c/code\u003e\u003c/a\u003e.\n\n## Running the Application\n### Running on the Web\nOpen the following website: https://linquiztics.up.railway.app/\n\n### Running Locally\n1. Before running the application locally, the following software have to be installed:\n\n   | Software | Description | Download Link | License |\n   | --- | --- | --- | --- |\n   | Node.js | JavaScript runtime built on Chrome's V8 JavaScript engine | https://nodejs.org/en/download/ | MIT License |\n   | git *(optional)* | Distributed version control system | https://git-scm.com/downloads | GNU General Public License v2.0 |\n\n2. Create a copy of this repository:\n   - If git is installed, type the following command on the terminal:\n   \n     ```\n     git clone https://github.com/memgonzales/linquiztics\n     ```\n   \n   - If git is not installed, click the green `Code` button near the top right of the repository and choose `Download ZIP`. Once the zipped folder has been downloaded, extract its contents.\n\n3. On the main project directory, run the following command to **install the dependencies**: \n\n   ```\n   npm install\n   ```\n\n   If the command is executed successfully, the dependencies will be installed into the folder \u003ccode\u003enode_modules\u003c/code\u003e following the dependency tree found in \u003ca href = \"https://github.com/memgonzales/linquiztics/blob/master/package-lock.json\"\u003e\u003ccode\u003epackage-lock.json\u003c/code\u003e\u003c/a\u003e.\n\n###\n   ***This project uses a pre-populated remote database. DO STEPS 4 TO 8 ONLY AFTER A DATABASE RESET OR MIGRATION TO A LOCAL DATABASE.***\n\n4. On the main project directory, run the following command to populate the database with **user accounts**: \n\n   ```\n   node misc/add_profile_data.js\n   ```\n\n   If the command is executed successfully, the following will be printed on the terminal (the assigned \u003ccode\u003e_id\u003c/code\u003e may vary):\n   ```\n   Added {\n       displayLanguages: [ 'English', 'Filipino' ],\n       quizzesCreated: [ 2, 6 ],\n       _id: 60a32d4fafac3e1430152ae4,\n       name: 'Gianina Yuchengco',\n       picture: '../assets/doggo.jpg',\n       username: 'gianinayuchengco',\n       email: 'gianinayuchengco@gmail.com' \n       \n   [... truncated ...]\n   \n   Database population complete! Press Ctrl + C to continue.\n   ```\n\n5. On the main project directory, run the following command to populate the database with **quizzes**:\n   ```\n   node misc/add_quiz_data.js\n   ```\n   \n   If the command is executed successfully, the following will be printed on the terminal (the assigned \u003ccode\u003e_id\u003c/code\u003e may vary):\n\n   ```\n   Added {\n       tags: [ 'animals', 'basic', 'German', 'introductory', 'vocabulary' ],\n       subjectLanguages: [ 'German' ],\n       ratings: [\n           5, 5, 5, 5, 4,\n           5, 5, 3, 1, 5\n       ],\n       accuracies: [\n           100, 100, 86, 86, 71,\n           71, 57, 43, 29\n       ],\n       _id: 60a9556188b8f82cdc92368d,\n       idNum: 1,\n       status: 'Published',\n       title: 'Basic Animals',\n       \n   [... truncated ...]\n   \n   Database population complete! Press Ctrl + C to continue.\n   ```\n   \n6. On the main project directory, run the following command to populate the database with **reported users**:\n   ```\n   node misc/add_userreport_data.js\n   ```\n   \n   If the command is executed successfully, the following will be printed on the terminal (the assigned \u003ccode\u003e_id\u003c/code\u003e may vary):\n\n   ```\n   Added {\n       _id: 60a959da39ac9f0c7cc6fa94,\n       index: 1,\n       name: 'Benny Terrier',\n       username: 'bulljanai',\n       reportDate: 2021-03-28T00:00:00.000Z,\n       report: 'Hate speech',\n       __v: 0\n       \n   [... truncated ...]\n   \n   Database population complete! Press Ctrl + C to continue.\n   ```\n   \n7. On the main project directory, run the following command to populate the database with **reported quizzes**:\n   ```\n   node misc/add_quizreport_data.js\n   ```\n   \n   If the command is executed successfully, the following will be printed on the terminal (the assigned \u003ccode\u003e_id\u003c/code\u003e may vary):\n\n   ```\n   Added {\n       _id: 60a959f76ea1853bf06ced89,\n       index: 1,\n       quizNum: 3,\n       title: 'Conyo 101',\n       author: 'danccgabe',\n       reportDate: 2021-03-31T00:00:00.000Z,\n       report: 'Hate speech',\n       __v: 0\n       \n   [... truncated ...]\n   \n   Database population complete! Press Ctrl + C to continue.\n   ```\n   \n8. On the main project directory, run the following command to populate the database with **reported comments**:\n   ```\n   node misc/add_commentreport_data.js\n   ```\n   \n   If the command is executed successfully, the following will be printed on the terminal:\n\n   ```\n   Added {\n       _id: 60a960ec6bc1dc3340e1d967,\n       index: 12,\n       commentNum: 21001,\n       quizNum: 2,\n       comment: 'Not beginner-friendly, but very cool :)',\n       author: 'japashiba',\n       quiz: 'Anime Quotes',\n       reportDate: 2021-05-22T19:52:12.556z,\n       report: 'Inappropriate content',\n       __v: 0\n       \n   [... truncated ...]\n   \n   Database population complete! Press Ctrl + C to continue.\n   ```\n  \n   \n9. On the main project directory, run the following command to **run the server**: \n   ```\n   node index.js\n   ```\n\n   If the command is executed successfully, the following will be displayed on the terminal:\n   \n    ```\n   app listening at port 3000\n   Connected to: mongodb+srv://admin:admin@linquiztics.k1zxp.mongodb.net/linquiztics?retryWrites=true\u0026w=majority\n   ```\n   \n   \n 10. Open the web application by accessing the following link on a browser:\n     ```\n     http://localhost:3000\n     ```\n\n     \u003cimg src=\"https://github.com/memgonzales/linquiztics/blob/master/website_screenshots/home.PNG?raw=True\" alt=\"Homepage\" width = 750\u003e \n   \n### Administrator Credentials  \nTo log in as an administrator, go to the \u003ca href = \"https://linquiztics.up.railway.app/login\"\u003eLogin\u003c/a\u003e page and enter the following credentials:\n   - Username: \u003ccode\u003elinquizticsadmin\u003c/code\u003e\n   - Password: \u003ccode\u003eASDFGHJKL123;\u003c/code\u003e\n   \n### Login Credentials (For Testing)\nTo test the features of a (non-administrator) user account, it is recommended to log in using the following credentials:\n   - Username: \u003ccode\u003egianinayuchengco\u003c/code\u003e\n   - Password: \u003ccode\u003eASDFGHJKL123;\u003c/code\u003e\n   \nNote that there are 23 pre-registered user accounts; the usernames are found in the file \u003ca href = \"https://github.com/memgonzales/linquiztics/blob/master/misc/add_profile_data.js\"\u003e\u003ccode\u003emisc/add_profile_data.js\u003c/code\u003e\u003c/a\u003e. The password to all these accounts is \u003ccode\u003eASDFGHJKL123;\u003c/code\u003e. (The period is not included.)\n\n\n## Built Using\nThis project follows the Model-View-Controller (MVC) architectural pattern:\n- **Model:** \u003ca href = \"https://www.mongodb.com/\"\u003eMongoDB\u003c/a\u003e as the database program and \u003ca href = \"https://mongoosejs.com/\"\u003eMongoose\u003c/a\u003e as the object data modeling tool\n- **View:** \u003ca href = \"https://handlebarsjs.com/\"\u003eHandlebars\u003c/a\u003e as the template engine\n- **Controller:** \u003ca href = \"https://nodejs.org/en/\"\u003eNode.js\u003c/a\u003e as the server environment\n\nThis web application is deployed on the cloud platform \u003ca href = \"https://dashboard.heroku.com/\"\u003eHeroku\u003c/a\u003e. Since Heroku has an ephemeral filesystem, \u003ca href = \"https://docs.mongodb.com/manual/core/gridfs/\"\u003eGridFS\u003c/a\u003e is used for the persistent storage of image and audio files.\n   \n💡 **UPDATE (12/22/2022):** With the shutting down of free Heroku services, we have migrated to [Railway](https://railway.app/), another cloud PaaS.\n\n## Dependencies\nThis project uses the following dependencies, which can be installed via the \u003ccode\u003enpm install\u003c/code\u003e command:\n\n| Package | Version | Description | License |\n| --- | --- | --- | --- |\n| \u003ccode\u003ebcrypt\u003c/code\u003e | 5.0.1 | Package for hashing passwords | Apache License 2.0 |\n| \u003ccode\u003ebody-parser\u003c/code\u003e | 1.19.0 | Package for parsing incoming requests in a middleware before the handlers | MIT License |\n| \u003ccode\u003econnect-mongo\u003c/code\u003e | 3.2.0 | MongoDB session store for Connect and Express | MIT License |\n| \u003ccode\u003edotenv\u003c/code\u003e | 8.2.0 | Package for loading environment variables from an \u003ccode\u003e.env\u003c/code\u003e file | BSD 2-Clause \"Simplified\" License |\n| \u003ccode\u003eexpress\u003c/code\u003e | 4.17.1 | Unopinionated and minimalist framework for Node.js | MIT License |\n| \u003ccode\u003eexpress-session\u003c/code\u003e | 1.17.1 | Session middleware for Express | MIT License |\n| \u003ccode\u003eexpress-validator\u003c/code\u003e | 6.10.1 | Express middleware for validator, a library of string validators and sanitizers | MIT License |\n| \u003ccode\u003egridfs-stream\u003c/code\u003e | 1.1.1 | Package for streaming files to and from MongoDB GridFS | MIT License |\n| \u003ccode\u003ehbs\u003c/code\u003e | 4.1.1 | Express view engine for Handlebars | MIT License |\n| \u003ccode\u003emongodb\u003c/code\u003e | 3.6.6 | Official MongoDB driver for Node.js | Apache License 2.0 |\n| \u003ccode\u003emongoose\u003c/code\u003e | 5.6.13 | MongoDB object modeling tool designed to work in an asynchronous environment | MIT License |\n| \u003ccode\u003emulter\u003c/code\u003e | 1.4.2 | Middleware for handling \u003ccode\u003emultipart/form-data\u003c/code\u003e, primarily used for file uploads | MIT License |\n| \u003ccode\u003emulter-gridfs-storage\u003c/code\u003e | 4.2.0 | GridFS storage engine for Multer to store uploaded files directly to MongoDB | MIT License |\n| \u003ccode\u003enodemailer\u003c/code\u003e | 6.6.0 | Package for sending emails with Node.js | MIT License | \n\n*The descriptions are taken from https://www.npmjs.com/.*\n\n## Authors\n- \u003cb\u003eMark Edward M. Gonzales\u003c/b\u003e \u003cbr/\u003e\n  mark_gonzales@dlsu.edu.ph \u003cbr/\u003e\n  gonzales.markedward@gmail.com \u003cbr/\u003e\n  \n- \u003cb\u003eHylene Jules G. Lee\u003c/b\u003e \u003cbr/\u003e\n  hylene_jules_lee@dlsu.edu.ph \u003cbr/\u003e\n  lee.hylene@gmail.com\n  \nFor queries or concerns related to the Linquiztics project, kindly email linquiztics.webmaster@gmail.com.\n  \nAssets (images and audio files) are properties of their respective owners. Attribution is found in the file \u003ca href = \"https://github.com/memgonzales/linquiztics/blob/master/public/assets/credits.txt\"\u003e\u003ccode\u003epublic/assets/credits.txt\u003c/code\u003e\u003c/a\u003e and displayed publicly on the \u003ca href = \"https://linquiztics.up.railway.app/credits\"\u003eCredits\u003c/a\u003e page.\n\n[badge-html5]: https://img.shields.io/badge/html5-%23E34F26.svg?style=flat\u0026logo=html5\u0026logoColor=white\n[badge-bootstrap]: https://img.shields.io/badge/bootstrap-%23563D7C.svg?style=flat\u0026logo=bootstrap\u0026logoColor=white\n[badge-js]: https://img.shields.io/badge/javascript-%23323330.svg?style=flate\u0026logo=javascript\u0026logoColor=%23F7DF1E\n[badge-jquery]: https://img.shields.io/badge/jquery-%230769AD.svg?style=flat\u0026logo=jquery\u0026logoColor=white\n[badge-mongodb]: https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=flat\u0026logo=mongodb\u0026logoColor=white\n[badge-express]: https://img.shields.io/badge/express.js-%23404d59.svg?style=flat\u0026logo=express\u0026logoColor=%2361DAFB\n[badge-nodejs]: https://img.shields.io/badge/node.js-6DA55F?style=flat\u0026logo=node.js\u0026logoColor=white\n[badge-mocha]: https://img.shields.io/badge/-mocha-%238D6748?style=flat\u0026logo=mocha\u0026logoColor=white\n[badge-heroku]: https://img.shields.io/badge/Heroku-430098?style=flat\u0026logo=heroku\u0026logoColor=white\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgonzales%2Flinquiztics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemgonzales%2Flinquiztics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgonzales%2Flinquiztics/lists"}