This project was made for the course of Software engineering NTUA. We were asked to make a system with movies details
- MySQL for the database
- NodeJS and Express for the server
- NextJS and React for the front end
- CSS for the front end
The backend folder contains:
- controllers: The logic of the routes.
- middlewares: Files like authentication, authorization, upload.
- routes: All routes that are being used in the project. Each route starts with http://localhost:9876/ntuaflix_api/{service}, where {service} is each file in routes folder. Each service has certain endpoints.
- test: Contains the tests that were written in order to check all of our endpoints. Jest and postman scripts were used for the testing.
- uploads: In this folder all uploads are been uploaded.
- Make sure your current directory is
softeng23-14/back-end - Create .env under repo's
backendfolder with your credentials for:DB_HOSTDB_USERDB_PASS
First you need to write npm install if you didn't already. To start use the command npm start.
To run the tests use npm test, or import the postman collection to postman and run it.
Cli-client commands:
- login : se2314 login --username <username> --passw <password>
- logout: se2314 logout
- add admin: se2314 adduser --username <username> --passw <password>
- view user: se2314 user --username <username>
- healthcheck: se2314 healthcheck
- resetall database: se2314 reset
- upload title basics file: se2314 newtitles --filenme <path_to_file>
- upload title aka file: se2314 newakas --filenme <path_to_file>
- upload name basics file: se2314 newnames --filenme <path_to_file>
- upload title crew file: se2314 newcrew --filenme <path_to_file>
- upload title episode file: se2314 newepisode --filenme <path_to_file>
- upload title principals file: se2314 newprincipals --filenme <path_to_file>
- upload title ratings file: se2314 newratings --filenme <path_to_file>
- information about a movie: se2314 title --titleID <titleID>
- search movie: se2314 searchtitle --titlepart <titlepart>
- search by genre: se2314 bygenre --genre <genre> --min <min_rating> (--from <start_year>) (--to <end_year>)
- information about a crew member: se2314 name --nameid <nameid>
- search crew member: se2314 searchname --name <namepart>
there is a user with username admin and password admin
First you need to write npm install if you didn't already. Next write npm install -g. Then you can use the commands that are been specified if you write se2314.
To run the tests use npm test.
The frontend folder contains:
- pages: We use this directory to streamline the routing process. Each file inside the pages directory corresponds to a route in our application. They start with http://localhost:3000/{page}, where {page} is the name of the page we want to access. To access the main page of our application, you should enter the following: http://localhost:3000/new, which {new} refers to the main page.
- styles: This includes a file named "globalstyles.css" which contains the CSS we used for the style of our pages and we import them in every file in the pages directory.
- public: Contains some images we used for our pages.
You have to make sure that your current directory is softeng23-14/front-end.
First you need to write npm install if you didn't already. To start the front-end use npm run dev.
To access this you need to write the following: http://localhost:3000/new, which represents the main page.