Skip to content

Commit

Permalink
Merge branch 'dev' into feature/CGD-47
Browse files Browse the repository at this point in the history
  • Loading branch information
JaneMoroz committed Sep 17, 2023
2 parents c965be3 + a286a98 commit a754ec7
Show file tree
Hide file tree
Showing 50 changed files with 421 additions and 345 deletions.
1 change: 0 additions & 1 deletion .dockerignore

This file was deleted.

29 changes: 24 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import"],
"plugins": ["@typescript-eslint", "import", "no-relative-import-paths"],
"extends": [
"plugin:import/recommended",
"plugin:import/typescript",
Expand All @@ -33,12 +33,20 @@
],
"react/function-component-definition": [
2,
{ "namedComponents": "function-declaration" }
{
"namedComponents": "function-declaration"
}
],
"react/destructuring-assignment": [2, "always"],
"react/button-has-type": 2,
"react/no-array-index-key": 2,
"import/order": 2,
"no-relative-import-paths/no-relative-import-paths": [
"error",
{
"allowSameFolder": true
}
],
"semi": [2, "always"],
"quotes": [2, "double"],
"prefer-destructuring": [
Expand All @@ -61,12 +69,23 @@
"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 }],
"brace-style": 2,
"no-multiple-empty-lines": 2,
"eol-last": [2, "always"],
Expand Down
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
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)
5 changes: 5 additions & 0 deletions cypress/fixtures/profile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 8739,
"name": "Jane",
"email": "[email protected]"
}
Loading

0 comments on commit a754ec7

Please sign in to comment.