Skip to content

Commit

Permalink
feat: New frontend
Browse files Browse the repository at this point in the history
Multiple features, fixes and UI/UX improvements. See the version update for more details.
  • Loading branch information
RezaRahemtola authored Mar 29, 2023
2 parents 492d6a7 + 706d043 commit 3247bea
Show file tree
Hide file tree
Showing 138 changed files with 8,509 additions and 5,459 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.gitignore
LICENSE
README.md
CONTRIBUTING.md

# Node
node_modules/
Expand All @@ -21,3 +22,8 @@ build/
# Infra
*Dockerfile*
*docker-compose*
.env.example

# IDEs
.idea/
.vscode/
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
NEXTAUTH_URL=http://localhost:8080
APP_URL=http://localhost:3000

NEXTAUTH_URL=$APP_URL
NEXTAUTH_SECRET="secret"

NEXT_PUBLIC_ALEPH_CHANNEL=TEST
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rules:

react-hooks/exhaustive-deps: off

no-console: off
no-console: ["warn", { allow: ["error"] }]

class-methods-use-this: off

Expand Down
Binary file removed .github/assets/home.png
Binary file not shown.
Binary file added .github/assets/ipc-computing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/assets/ipc-storage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .github/assets/ipc-upload-a-program.png
Binary file not shown.
Binary file added .github/assets/landing-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 22 additions & 12 deletions .github/workflows/end-to-end-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,38 @@ on: [push]

jobs:
cypress-run:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Create env file
run: |
touch .env
echo NEXT_PUBLIC_ALEPH_CHANNEL=${{ secrets.NEXT_PUBLIC_ALEPH_CHANNEL }} >> .env
echo NEXT_PUBLIC_GITCLONE_DIR=${{ secrets.NEXT_PUBLIC_GITCLONE_DIR }} >> .env
echo NEXT_PUBLIC_GITHUB_CLIENT_ID=${{ secrets.NEXT_PUBLIC_GITHUB_CLIENT_ID }} >> .env
echo NEXT_PUBLIC_GITHUB_CLIENT_SECRET=${{ secrets.NEXT_PUBLIC_GITHUB_CLIENT_SECRET }} >> .env
echo NEXTAUTH_URL=${{ secrets.NEXTAUTH_URL }} >> .env
echo NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }} >> .env
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.next/cache
key: nextjs-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/*.ts', '**/*.tsx') }}
restore-keys: |
nextjs-${{ hashFiles('yarn.lock') }}-
- name: Run cypress
uses: cypress-io/github-action@v4
with:
start: docker compose up
wait-on: "http://localhost:8080"
build: yarn build
start: yarn start
wait-on: ${{ secrets.APP_URL }}
wait-on-timeout: 300
env:
NEXT_PUBLIC_ALEPH_CHANNEL: ${{ secrets.NEXT_PUBLIC_ALEPH_CHANNEL }}
NEXT_PUBLIC_GITCLONE_DIR: ${{ secrets.NEXT_PUBLIC_GITCLONE_DIR }}
NEXT_PUBLIC_GITHUB_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_GITHUB_CLIENT_ID }}
NEXT_PUBLIC_GITHUB_CLIENT_SECRET: ${{ secrets.NEXT_PUBLIC_GITHUB_CLIENT_SECRET }}
NEXTAUTH_URL: ${{ secrets.APP_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}

- name: Get screenshots
uses: actions/upload-artifact@v1
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/eslint-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ on: [push]

jobs:
eslint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn

- name: Install dependencies
run: yarn
run: yarn install --frozen-lockfile

- name: Run eslint
run: yarn lint > eslint-results
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Create an issue

- If you've encountered a bug, open a [Bug Report](https://github.com/PoCInnovation/InterPlanetaryCloud/issues/new?assignees=&labels=&template=bug_report.md&title=).
- If you want InterPlanetaryCloud to have a new fonctionality, open a [Feature Request](https://github.com/PoCInnovation/InterPlanetaryCloud/issues/new?assignees=&labels=&template=feature_request.md&title=).
- If you want InterPlanetaryCloud to have a new functionality, open a [Feature Request](https://github.com/PoCInnovation/InterPlanetaryCloud/issues/new?assignees=&labels=&template=feature_request.md&title=).

## Resolve an issue

Expand Down Expand Up @@ -69,7 +69,7 @@ git push -f <fork name>
Contributions to this project must be accompanied by a Developer Certificate of
Origin (DCO).

All commit messages must contain the Signed-off-by line with an email address that matches the commit author. When commiting, use the `--signoff` flag:
All commit messages must contain the Signed-off-by line with an email address that matches the commit author. When committing, use the `--signoff` flag:

```sh
git commit -s
Expand Down
30 changes: 18 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
FROM node:16-alpine
FROM node:16 AS builder

# Create app directory
WORKDIR /app

# Copy source (see .dockerignore)
COPY . .
# Copy dependencies files
COPY package.json yarn.lock ./

# Install dependencies
RUN yarn --frozen-lockfile
RUN yarn

# Copy source (see .dockerignore)
COPY . .

# Build
RUN yarn build

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
RUN mv next.config.js .next/standalone/
RUN mv public .next/standalone/
RUN mv .next/static .next/standalone/.next/

WORKDIR /app/.next/standalone
FROM node:16.19.0-alpine3.17 AS runner

WORKDIR /app

ENV PORT 8080
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder /app/.next/standalone ./standalone
COPY --from=builder /app/public ./standalone/public
COPY --from=builder /app/.next/static ./standalone/.next/static

CMD ["node", "server.js"]
CMD ["node", "./standalone/server.js"]
Loading

0 comments on commit 3247bea

Please sign in to comment.