-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
33 lines (20 loc) · 1.72 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Limitations of current features:
A movie only has one genre.
A movie does not have tags. It is only searchable through the title. The search likewise is also a simple SQLite query.
The year is required.
No lazy loading in the movie cards (home) page, so the app does not scale for long lists of movies.
Frontend:
The UI/UX is pretty bad. The size of the cards and images within are not consistent. The 'clickable' portion of the card that takes you to the corresponding movie page is bigger than the card itself.
There is also no theming.
Lastly, the layout does not answer the rare case (in real life) where there is only 1 or 2 movies, hence the cards should still center accordingly.
Backend:
There is also no 404 page for endpoints that are not defined
Query caching is not introduced, hence the site makes redundant queries.
Security:
Access-Control-Allow-Origin and etc is set to wildcard, instead of the ideal solution of basing it on the request's Origin header. (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin). There is also no auth key system.
The website is not tested to deal against SQL injections.
Code:
The code will be hard to maintain. The schema is defined both in frontend and backend, and changing one will require manually changing the other. Not to mention the fact that modifying the sql DB schemas also requires manual update in the code schemas.
-- A suggested fix: make a third folder that contains the constants and schemas, publish to private npm package, and have the frontend/backend import from it
Some redundant code between the edit movie form and new movie form. It can be refactored to its own component, taking defaultValues as props and etc.
Redundant query codes.