Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cgd 35 #14

Merged
merged 18 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore

This file was deleted.

72 changes: 57 additions & 15 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import"],
"plugins": [
"@typescript-eslint",
"import"
],
"extends": [
"plugin:import/recommended",
"plugin:import/typescript",
Expand All @@ -28,19 +31,32 @@
"error",
{
"selector": "interface",
"format": ["PascalCase"]
"format": [
"PascalCase"
]
}
],
"react/function-component-definition": [
2,
{ "namedComponents": "function-declaration" }
{
"namedComponents": "function-declaration"
}
],
"react/destructuring-assignment": [
2,
"always"
],
"react/destructuring-assignment": [2, "always"],
"react/button-has-type": 2,
"react/no-array-index-key": 2,
"import/order": 2,
"semi": [2, "always"],
"quotes": [2, "double"],
"semi": [
2,
"always"
],
"quotes": [
2,
"double"
],
"prefer-destructuring": [
2,
{
Expand All @@ -57,19 +73,45 @@
"enforceForRenamedProperties": false
}
],
"object-curly-spacing": [2, "always"],
"arrow-body-style": [2, "as-needed"],
"arrow-parens": [2, "always"],
"object-curly-spacing": [
2,
"always"
],
"arrow-body-style": [
2,
"as-needed"
],
"arrow-parens": [
2,
"always"
],
"space-infix-ops": 2,
"arrow-spacing": [2, { "before": true, "after": true }],
"no-unused-vars": [2, { "args": "all", "argsIgnorePattern": "_" }],
"arrow-spacing": [
2,
{
"before": true,
"after": true
}
],
"no-unused-vars": [
2,
{
"args": "all",
"argsIgnorePattern": "_"
}
],
"guard-for-in": 2,
"no-await-in-loop": 2,
"indent": [2, 2],
"object-curly-newline": [2, { "minProperties": 4, "consistent": true }],
"indent": [
2,
2
],
"brace-style": 2,
"no-multiple-empty-lines": 2,
"eol-last": [2, "always"],
"eol-last": [
2,
"always"
],
"no-nested-ternary": 2
}
}
}
15 changes: 0 additions & 15 deletions Dockerfile.dev

This file was deleted.

81 changes: 2 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ First we need to have yarn installed on your computer, to do so, run the followi
```bash
npm install --global yarn
```

To install all the project dependencies, inside the project's root folder, run the following in the command line

```bash
Expand All @@ -13,86 +12,10 @@ yarn

Create a `.env` file at the root of your project using the `.env.example` file to know which keys to add


Add these env variables specifically (it's important to have exactly the same because of how docker is configured):
```
DATABASE_URL=postgresql://chingu:chingu@chingu:5433/dashboard?schema=public
HOSTNAME=chingu
POSTGRES_USER=chingu
POSTGRES_PASSWORD=chingu
POSTGRES_DB=dashboard
[email protected]
PGADMIN_PW=chingu5432
```

Run these commands when starting up your project:

```
docker compose build
docker compose up
```

Open a 2nd terminal window and run these commands:

```
docker ps
docker exec -it <id of app container> sh
npx prisma migrate dev
```

Docker ps should list 3 containers (assuming you're not running anything else). If you have more, you can just look for 3 that were created recently. The
id you want should be under a image name of something like chingu-dashboard_app (it should be whatyounamedyourprojectfolder-app). The other 2 image names will have pgadmin and postgres in it (look for the one without
those in its name).

If you have docker desktop, you can just use the cli in the app container using the gui (way easier).

To open pgadmin, go to localhost:4000. Put in the credentials, as written in the .env file. Again, if you have docker desktop, you can just open from the gui.

To run prisma studio, follow the same steps above to invoke a command inside your docker container.

```
docker ps (to find the id of your container)
docker exec -it <id of app container> sh
npx prisma studio
```

**It is important to run your migration before running prisma studio or it will error**

You can access prisma studio at localhost:5555

When done with your session, run the following command:

```
docker compose down
```

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:
To run the development server:

```bash
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Open [http://localhost:3000](http://localhost:3000)
44 changes: 0 additions & 44 deletions docker-compose.yml

This file was deleted.

7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "prisma generate && next dev",
"build": "prisma generate && next build",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"prettier": "prettier . --write",
Expand All @@ -14,11 +14,8 @@
},
"dependencies": {
"@heroicons/react": "^2.0.18",
"@prisma/client": "5.1.1",
"@reduxjs/toolkit": "^1.9.5",
"next": "13.4.12",
"next-auth": "^4.22.3",
"prisma": "^5.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-redux": "^8.1.2",
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions prisma/migrations/migration_lock.toml

This file was deleted.

16 changes: 0 additions & 16 deletions prisma/schema.prisma

This file was deleted.

Binary file removed public/grey_ball.png
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file added public/img/ideation_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions src/app/api/auth/[...nextauth]/options.ts

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/api/auth/[...nextauth]/route.ts

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/api/test/route.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/app/ideation/components/fixtures/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ideation, type Ideation } from "./ideation";
7 changes: 7 additions & 0 deletions src/app/ideation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ import {
IdeationContainer,
ideation,
} from "./components";
import { Banner } from "@/components";

function IdeationPage() {
return (
<div className="flex flex-row justify-center">
<div className="flex flex-col gap-y-9 p-3">
<Banner
image="/img/ideation_banner.png"
alt="ideation_banner"
title="Ideation"
description="Okay, time to put on your thinking caps and channel your inner creativity! What kind of amazing, mind-blowing project idea do you have that will make SpaceX jealous? Let's hear it!"
/>
<CreateIdeationContainer />
{ideation.map((i) => (
<IdeationContainer
Expand Down
22 changes: 22 additions & 0 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Image from "next/image";

interface BannerProps {
image: string;
alt: string;
title: string;
description: string;
}

function Banner({ image, alt, title, description }: BannerProps) {
return (
<div className="card w-[1280px] h-[320px] bg-accent-content flex flex-row px-20">
<Image src={image} alt={alt} width={454} height={300} priority={false} />
<div className="flex flex-col justify-center pl-24 gap-y-3.5">
<h3 className="text-3xl font-bold text-black">{title}</h3>
<p className="text-lg font-medium text-black">{description}</p>
</div>
</div>
);
}

export default Banner;
Loading
Loading