|
1 | | -Project Structure Draft: |
| 1 | +# Course-Compass |
| 2 | +## by team [Inference](https://inferencekth.github.io/Course-Compass/) |
| 3 | +Course-Compass is a webpage for interacting with the kth courses via the kth api. It allows for searching and filtering through all active courses. |
| 4 | + |
| 5 | +## How to run |
| 6 | + |
| 7 | +Running this project locally can be done via docker or by building and running it with npm. |
| 8 | + |
| 9 | +### Running via docker |
| 10 | + |
| 11 | +Executing |
| 12 | + |
| 13 | +```bash |
| 14 | +docker compose up |
| 15 | +``` |
| 16 | +or |
| 17 | +```bash |
| 18 | +docker-compose up |
| 19 | +``` |
| 20 | +builds and starts the container. |
| 21 | + |
| 22 | + |
| 23 | +### Building with NPM |
| 24 | +After downloading the repository navigate to the folder my-app and install the dependencies with |
| 25 | + |
| 26 | +```bash |
| 27 | +npm ci |
| 28 | +``` |
| 29 | +The website can run for developers with |
| 30 | +```bash |
| 31 | +npm run dev |
| 32 | +``` |
| 33 | + |
| 34 | +for production use |
| 35 | +```bash |
| 36 | +npm run build |
| 37 | +``` |
| 38 | + |
| 39 | +## Project structure |
| 40 | +The project uses the **[Model–view–presenter (MVP)](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter)** paradime. The view displays the data. The presenter contains the logic. The model contains the data. |
| 41 | + |
2 | 42 |
|
3 | 43 | ``` |
4 | 44 | . |
5 | | -├── firebase.js // handles fetching and saving to the realtime database on firebase |
6 | | -├── firebase.json // used for firebase deploy |
7 | | -├── index.html // the main index page - contains header and loads the index.jsx |
8 | | -├── package.json // used for nodejs (npm) packages |
9 | | -├── package-lock.json // used for nodejs (npm) packages |
10 | | -├── README.md // this file ^^ |
11 | | -├── src // contains all source filed |
12 | | -│ ├── assets // content, e.g. pictures, ressources etc. |
13 | | -│ │ └── react.svg |
14 | | -│ ├── index.jsx // the react router - routes between pages, all pages are inserted here |
15 | | -│ ├── model.js // the model - handles prog. logic, that is either global or account specific |
16 | | -│ ├── pages // pages combine the presenters to a webpage. mby obsolete for 1 page project |
17 | | -│ │ └── App.jsx // The future homepage? |
18 | | -│ ├── presenters // Presenters link views and the model. |
19 | | -│ | Hooks to modify the model & component state is defined here |
20 | | -│ │ └── HandleSearchPresenter.jsx // An example presenter |
21 | | -│ ├── styles.css // a style document - mby one for each view? |
22 | | -│ └── views // views define parts of pages cosmetically. |
23 | | -│ └── DummyView.jsx |
24 | | -└── vite.config.js |
| 45 | +├── docker-compose.yml |
| 46 | +├── Dockerfile |
| 47 | +├── docs |
| 48 | +│ ├── _config.yml |
| 49 | +│ └── index.md |
| 50 | +├── my-app |
| 51 | +│ ├── dist |
| 52 | +│ │ ├── assets |
| 53 | +│ │ │ ├── index-BNDm07oX.js |
| 54 | +│ │ │ ├── index-Bwi9_b9d.css |
| 55 | +│ │ │ ├── pdf.worker-CKnUz2wA.mjs |
| 56 | +│ │ │ └── project_icon-CgaTQWFX.png |
| 57 | +│ │ └── index.html |
| 58 | +│ ├── eslint.config.js |
| 59 | +│ ├── firebase.js |
| 60 | +│ ├── firebase.json |
| 61 | +│ ├── firebaseModel.js |
| 62 | +│ ├── index.html |
| 63 | +│ ├── package.json |
| 64 | +│ ├── package-lock.json |
| 65 | +│ ├── postcss.config.js |
| 66 | +│ ├── public |
| 67 | +│ │ ├── favicons-dark |
| 68 | +│ │ │ ├── android-chrome-192x192.png |
| 69 | +│ │ │ ├── android-chrome-512x512.png |
| 70 | +│ │ │ ├── apple-touch-icon.png |
| 71 | +│ │ │ ├── favicon-16x16.png |
| 72 | +│ │ │ ├── favicon-32x32.png |
| 73 | +│ │ │ ├── favicon.ico |
| 74 | +│ │ │ └── site.webmanifest |
| 75 | +│ │ └── favicons-light |
| 76 | +│ │ ├── android-chrome-192x192.png |
| 77 | +│ │ ├── android-chrome-512x512.png |
| 78 | +│ │ ├── apple-touch-icon.png |
| 79 | +│ │ ├── favicon-16x16.png |
| 80 | +│ │ ├── favicon-32x32.png |
| 81 | +│ │ ├── favicon.ico |
| 82 | +│ │ └── site.webmanifest |
| 83 | +│ ├── src |
| 84 | +│ │ ├── assets |
| 85 | +│ │ │ ├── example.json |
| 86 | +│ │ │ ├── project_icon1.png |
| 87 | +│ │ │ ├── project_icon.png |
| 88 | +│ │ │ └── share_icon.png |
| 89 | +│ │ ├── dev |
| 90 | +│ │ │ ├── index.js |
| 91 | +│ │ │ ├── palette.jsx |
| 92 | +│ │ │ ├── previews.jsx |
| 93 | +│ │ │ ├── README.md |
| 94 | +│ │ │ └── useInitial.js |
| 95 | +│ │ ├── index.jsx |
| 96 | +│ │ ├── model.js |
| 97 | +│ │ ├── pages |
| 98 | +│ │ │ ├── App.jsx |
| 99 | +│ │ │ └── SharedView.jsx |
| 100 | +│ │ ├── presenters |
| 101 | +│ │ │ ├── AddToDB.jsx |
| 102 | +│ │ │ ├── FilterPresenter.jsx |
| 103 | +│ │ │ ├── ListViewPresenter.jsx |
| 104 | +│ │ │ ├── PrerequisitePresenter.jsx |
| 105 | +│ │ │ ├── ReviewPresenter.jsx |
| 106 | +│ │ │ ├── SearchbarPresenter.jsx |
| 107 | +│ │ │ ├── SidebarPresenter.jsx |
| 108 | +│ │ │ ├── Tests |
| 109 | +│ │ │ │ ├── AddToDB.jsx |
| 110 | +│ │ │ │ ├── AllCoursesPresenter.jsx |
| 111 | +│ │ │ │ └── JsonToDatabase.jsx |
| 112 | +│ │ │ └── UploadTranscriptPresenter.jsx |
| 113 | +│ │ ├── scripts |
| 114 | +│ │ │ ├── eligibility_refined.js |
| 115 | +│ │ │ └── transcript-scraper |
| 116 | +│ │ │ ├── transcript-gpt.html |
| 117 | +│ │ │ ├── transcript-scraper-htmlTester.html |
| 118 | +│ │ │ └── transcript-scraper.mjs |
| 119 | +│ │ ├── styles.css |
| 120 | +│ │ └── views |
| 121 | +│ │ ├── Components |
| 122 | +│ │ │ ├── CoursePagePopup.jsx |
| 123 | +│ │ │ ├── CourseViewComponents |
| 124 | +│ │ │ │ ├── ModalComponent.jsx |
| 125 | +│ │ │ │ └── SampleComponent.jsx |
| 126 | +│ │ │ ├── FavouriteDropdown.jsx |
| 127 | +│ │ │ ├── PrerequisiteTreeComponents |
| 128 | +│ │ │ │ └── BoxTest.jsx |
| 129 | +│ │ │ ├── RatingComponent.jsx |
| 130 | +│ │ │ ├── SideBarComponents |
| 131 | +│ │ │ │ ├── ButtonGroupField.jsx |
| 132 | +│ │ │ │ ├── ButtonGroupFullComponent.jsx |
| 133 | +│ │ │ │ ├── CollapsibleCheckboxes.jsx |
| 134 | +│ │ │ │ ├── CourseTranscriptList.jsx |
| 135 | +│ │ │ │ ├── DropDownField.jsx |
| 136 | +│ │ │ │ ├── FilterEnableCheckbox.jsx |
| 137 | +│ │ │ │ ├── SliderField.jsx |
| 138 | +│ │ │ │ ├── ToggleField.jsx |
| 139 | +│ │ │ │ ├── ToolTip.jsx |
| 140 | +│ │ │ │ └── UploadField.jsx |
| 141 | +│ │ │ └── StarComponent.jsx |
| 142 | +│ │ ├── ListView.jsx |
| 143 | +│ │ ├── PrerequisiteTreeView.jsx |
| 144 | +│ │ ├── ReviewView.jsx |
| 145 | +│ │ ├── SearchbarView.jsx |
| 146 | +│ │ ├── SidebarView.jsx |
| 147 | +│ │ ├── TestAllCoursesView.jsx |
| 148 | +│ │ └── TestWithButtonView.jsx |
| 149 | +│ ├── tailwind.config.js |
| 150 | +│ └── vite.config.js |
| 151 | +└── README.md |
| 152 | +
|
| 153 | +21 directories, 87 files |
25 | 154 | ``` |
26 | 155 |
|
27 | 156 |
|
| 157 | +## Other branches |
| 158 | + |
| 159 | +The **[docs](https://github.com/InferenceKTH/Course-Compass/tree/kth-api)** branch contains the team website. |
| 160 | + |
| 161 | +The **[kth-api](https://github.com/InferenceKTH/Course-Compass/tree/kth-api)** contains most of the tools used for gathering and processing the course info. |
| 162 | + |
| 163 | + |
0 commit comments