GroupThreeFS / FullStack_GroupThree

The Final Sprint Project showcasing our knowledge of interacting node js with mongo db and postgres sql to create a search function similar to google.
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

File Structure Init #1

Closed JonnyNL closed 1 year ago

JonnyNL commented 1 year ago

We need a file structure, structured in a way that it will help us work simultaneously and without tripping over eachother. Here is what I am thinking. Please check Discord for proper branch naming

/search-engine-project -- /public (This directory contains all the static files like CSS, JS, and images.) -- /css -- /js -- /images
-- /src (This is where the main application code resides.)
-- /config (Contains configuration files, like the MongoDB connection settings.)
-- mongodb.js (MongoDB connection settings)
-- postgres.js (PostgreSQL connection settings)
-- /models ( Separate directories for MongoDB and PostgreSQL models. Depending on the database selected for a search, use the corresponding model.)
-- /mongo
-- SearchItem.js (Mongoose model)
-- /postgres
-- SearchItem.js (Sequelize or other ORM model)
-- /routes (Contains all the route definitions.)
-- search.js
-- otherRoutes.js
-- /controllers (Contains functions that handle the logic for each route. like mongodb or postgres)
-- searchController.js
-- /middleware (Contains middleware functions, like authentication and error handling.)
-- authentication.js
-- errorHandling.js
-- /utils (Contains utility functions that can be used throughout the application.)
-- searchUtils.js
-- /views (Templates for our views)
-- login.ejs (user login, we could use a partial login navbar instead if preferred)
-- query.ejs (search page before search)
-- results.ejs (searched page with results)
-- app.js
-- .env (environment variables, e.g., MongoDB URI, PostgreSQL URI)

^^This will also include files from NPM INIT and NPM INSTALL^^

JonnyNL commented 1 year ago

Closing this, finished it and asked people multiple times to close this issue. 12 hours pending is too long. shameful