ffcsthingy / ffcsthingy2.0 Goto Github PK
View Code? Open in Web Editor NEWA course scheduling tool for FFCS in VIT, Vellore. Easily adaptable to any schedule/timetable. https://discord.com/invite/Un4UanH
License: MIT License
A course scheduling tool for FFCS in VIT, Vellore. Easily adaptable to any schedule/timetable. https://discord.com/invite/Un4UanH
License: MIT License
Add a git hook manager
Ideally, lefthook
Modify passport to accept sessions without auth
Allow linking a google account to session if data sync is preferred
courseUtility.js:
It would be really handy if the site Email setup and would notify users via Email.
I can work on it with Sendgrid and SMTP if given the right resources
Prefix all interfaces with I
to add consistency and reduce ambiguous naming.
Ex: ISomeComponent
or IUser
, IDashboardComponent
, IDashboard
Served from backend right now. Remove that dependency
The layout of the app does not look good on iPads in portrait mode (768x1024 px).
This could be fixed by making the CourseSelection
component wider and the SlotTable
narrower, and changing the column count for it.
The Navbar
also needs editing. A possible solution would be to allow it to collapse into a hamburger menu like on mobile screens.
The Timetable
component also overflows. It could be made to split into two parts like on Mobile Screens (eg: 360x740 px).
This should be a quick fix by changing the media query here:
A lot of places in the codebase use snake_casing
, which is not consistent with the rest of the code. These could be replaced with camelCased
names to adhere to JS naming conventions.
Examples:
User Model
Course Model
Changes to these will require changes in places in the frontend as well as the backend.
This is a significant refactor spanning multiple files in both the frontend and the backend.
Add two same slots to different timetables
Deleting from one will also delete from the other
If I am allowed I can Help to deploy this Website on Heroku and the DB on MongoDB servers and make the project live .
I have made similar projects and can help you with it
Axios Hooks make code unclean imo
Can be replaced with simple useEffects
https://www.robinwieruch.de/react-hooks-fetch-data
Not a very major refactor
If showModal is true
Initial Render renders the modal with the animation multiple times
Possibly due to multiple re-renders of the navbar
Maybe move the modal to Dashboard?
Currently, protected routes use weird route names to attempt to obfuscate them.
Adding scopes to the user model should alleviate the need for this.
On phones, it is possible to zoom in and out. This shouldn't be possible.
Fixing this should be possible with minor changes to the Index HTML
classnames
is a simpler way to interact with class names in React.
Allows for using an array or dict to defined classes, can make code a lot cleaner.
/* components/submit-button.js */
import { Component } from 'react';
import classNames from 'classnames/bind';
import styles from './submit-button.css';
let cx = classNames.bind(styles);
export default class SubmitButton extends Component {
render () {
let text = this.props.store.submissionInProgress ? 'Processing...' : 'Submit';
let className = cx({
base: true,
inProgress: this.props.store.submissionInProgress,
error: this.props.store.errorOccurred,
disabled: this.props.form.valid,
});
return <button className={className}>{text}</button>;
}
};
Something like, since you chose this course, you might want to take this too. Or something like, Other people have taken B when they took A.
This is a major feature that would require leveraging the data in the DB and adding routes to provide the recommendations to the client.
There is no defined structure to this feature. Ideation and Suggestions on how to do this with Node and Mongo is welcomed.
SlotTable uses componentWillReceiveProps
MagicFill uses ComponentDidUpdate
Both set state inside this
Change to DerivedStateFromProps
Allow copying the timetable with a new name
Had issues making it work previously. For some reason the array didn't get updated with a new timetableName for the copied values. Could be some logic bug. (pretty sure that map call is fucked up).
This code is old and will need to be refactored to work with hooks similar to how the other timetable actions are handled
doTimetableCopy = (newName) => {
if (this.state.timetableNames.includes(newName)) return;
this.setState(prevState => ({
timetableNames: [...prevState.timetableNames, newName],
timetable: [...prevState.timetable, ...prevState.timetable.map(v => {
if(v.timetableName === prevState.activeTimetable)
v.timetableName = newName;
return v;
})]
}), () => {
this.changeActiveTimetable(newName);
});
}
Lots of reducers call Date.now(). This is an anti-pattern and makes the reducer an impure function.
Solution
In terms of the implementation I had in mind, we could try passing a timestamp to the reducer (using Date.now()
), which can then be processed to convert it to the ISOString that the reducer uses currently.
Essentially, the Date.now()
component moves out of the reducers and to the place where the action is being dispatched. The reducers would not need any changes in logic.
Keep in mind, we will also have to modify the dispatches that happen from the components.
When a course is deleted, clashing slots list on SlotCard doesn't update to reflect the new list until forced to re-render by changing selected course to something else and back.
Slot: L1+L2
Clash shows: A1, F1
A1 deleted
Clash show: A1, F1
Should Show: F1
Currently, a backend is required to get courses, curriculums. This dependency can be removed if a bare-bones app is required.
Content that would need to be hosted can be found in the response of:
/course/fullHeatmap
/course/allCourseLists
/curriculum/curriculumFromPrefix/<prefix>
/curriculum/prefixes
req.user.timestamp
seems to be updated on login
Add a property timetableTimestamp
and use that to check for update time
OR
Figure out where the timestamp
is being changed and fix it
allCourseLists
and fullHeatmap
return data along with a success message.nginx
for the response, since it would probably have to process the whole thing on every response.Will require restructuring of the routes
courseUtility
filezlib
for gzippingregardless
parameter like in the existing queries to force an updateThe selected courses table can have a column for course category (UC/PC/UE/PE/whatever)
There is no way to share/save timetables for now.
A useful feature would be to add a button that allows saving a screenshot of the timetable as a PNG/PDF or the course list as a CSV/TXT file.
Something like this could be used, provided it keeps the CSS on print.
Exporting to a downloadable CSV/TXT file should be trivial.
The useEffect hook for slot filter should trigger only on selected course change
Most components and reducers do not have tests as of now.
Tests are implemented for timetable
and course
reducers, but lack certain cases/tests.
updateClashmap()
utility functionsyncTimetable
Thunk call with redux-mock-store
. rejected/pending/fulfilled reducer tests implemented.redux-mock-store
Currently deployment is through a standard pull and restart method.
Can add docker and setup a CI/CD pipeline for seamless deployments.
backend/samples/curriculum
could be converted to JSON.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.