├── .eslintignore
├── client
├── src
│ ├── vite-env.d.ts
│ ├── components
│ │ ├── Error.tsx
│ │ ├── Home.tsx
│ │ ├── AddMovie.tsx
│ │ ├── EditModal.tsx
│ │ └── MovieDisplay.tsx
│ ├── utils
│ │ ├── types.ts
│ │ └── sample-queries.ts
│ ├── main.tsx
│ ├── App.tsx
│ ├── App.css
│ ├── assets
│ │ └── TroveQL ICON.svg
│ └── index.css
├── tsconfig.node.json
├── vite.config.ts
├── tsconfig.json
├── package.json
├── index.html
└── public
│ └── vite.svg
├── server
├── .env
├── tsconfig.json
├── package.json
├── schema.js
├── resolvers.js
├── index.js
├── index.ts
├── data.js
└── package-lock.json
├── database
├── config
│ └── config.js
└── models
│ ├── index.js
│ ├── actorModel.js
│ ├── movieModel.js
│ ├── watchlistModel.js
│ └── movie_actorModel.js
├── .sequelizerc
├── .gitignore
├── .eslintrc.json
├── package.json
├── README.md
└── assets
└── TroveQL-black.svg
/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | /server/index.js
--------------------------------------------------------------------------------
/client/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/server/.env:
--------------------------------------------------------------------------------
1 | PG_URI="postgres://gvemrzdz:Y4VyUaXsnS_h7tttHnZQOjCi2yk5uifi@mahmud.db.elephantsql.com/gvemrzdz"
2 | NODE_ENV="development"
--------------------------------------------------------------------------------
/database/config/config.js:
--------------------------------------------------------------------------------
1 | const config = {
2 | development: {
3 | use_env_variable: 'PG_URI',
4 | dialect: 'postgresql',
5 | }
6 | };
7 |
8 | module.exports = config;
--------------------------------------------------------------------------------
/client/src/components/Error.tsx:
--------------------------------------------------------------------------------
1 | function Error() {
2 | return (
3 |
4 |
Oops!
5 |
This page does not exist.
6 |
7 | )
8 | }
9 |
10 | export default Error;
--------------------------------------------------------------------------------
/client/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "allowSyntheticDefaultImports": true
7 | },
8 | "include": ["vite.config.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/client/src/utils/types.ts:
--------------------------------------------------------------------------------
1 | export type Actor = {
2 | id: number,
3 | name: string
4 | }
5 |
6 |
7 | export type Movie = {
8 | id: number,
9 | title: string,
10 | genre: string,
11 | year: number,
12 | actors: Actor[]
13 | };
14 |
15 | export type GetMoviesData = {
16 | data: {
17 | movies: Movie[]
18 | }
19 | }
--------------------------------------------------------------------------------
/.sequelizerc:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | require('dotenv').config();
4 |
5 | const path = require('path')
6 | module.exports = {
7 | config: path.resolve('./database/config', 'config.js'),
8 | 'models-path': path.resolve('./database/models'),
9 | 'seeders-path': path.resolve('./database/seeders'),
10 | 'migrations-path': path.resolve('./database/migrations'),
11 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/client/src/main.tsx:
--------------------------------------------------------------------------------
1 | import 'vite/modulepreload-polyfill'
2 | import React from 'react'
3 | import ReactDOM from 'react-dom/client'
4 | import { BrowserRouter as Router} from "react-router-dom"
5 | import App from './App'
6 |
7 | // Import css stylesheet
8 | import './index.css'
9 |
10 | ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
11 |