Skip to content

Commit

Permalink
Merge branch 'main' into feat/nodemailer
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Dec 29, 2023
2 parents fa7ce6c + b0228d0 commit 7a0be5d
Show file tree
Hide file tree
Showing 12 changed files with 137 additions and 25 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
69 changes: 69 additions & 0 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
on:
push:
paths: ['apps/web/**', '.github/workflows/web.yaml']
pull_request:
paths: ['apps/web/**']

jobs:
validate:
runs-on: ubuntu-latest
name: Validate

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

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Install packages
run: |
pnpm i
- name: Lint
run: |
pnpm run lint:web
- name: Test
run: |
pnpm run test:web
build:
needs: validate
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Build and push docker image

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

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker image
run: docker build -t keyshade/keyshade-web:latest -f Dockerfile-web .

- name: Push Docker image
run: docker push keyshade/keyshade-web

deploy:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Deploy to Render

steps:
- name: deploy
run: curl ${{ secrets.RENDER_WEB_DEPLOY_HOOK }}
18 changes: 18 additions & 0 deletions Dockerfile-web
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:20-alpine as build

WORKDIR /app

RUN npm i -g pnpm

COPY package.json .
COPY tsconfig.base.json .

RUN pnpm install

COPY apps/web apps/web

RUN pnpm run build:web

EXPOSE 3000

ENTRYPOINT ["pnpm", "run", "start:web"]
1 change: 1 addition & 0 deletions apps/web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vercel
28 changes: 19 additions & 9 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@

import { Poppins } from 'next/font/google'
import Links from './components/Links'
import Killers from './components/Killers'
import Links from '../components/Links'
import Killers from '../components/Killers'
import { Logo, Grid, Stars } from '../public'
const poppins = Poppins({
subsets: ['latin'],
weight: ['400', '500', '600', '700']
})
export default async function Index() {

function Index() {
return (
<div className="relative">
<div className="absolute z-10 opacity-25">
<section className="h-[100vh] w-screen bg-[radial-gradient(ellipse_at_top_center,_#fff_20%,#ff03080B_80%)] opacity-50" />
</div>
<div className="bg-[#03080B] w-full min-h-screen flex justify-center items-center absolute">
<Grid className="h-[69.16vh] w-[61.23vw] absolute " />
<Stars className='h-[47.51vh] w-[87.92vw] absolute overflow-hidden' />
<Stars className="h-[47.51vh] w-[87.92vw] absolute overflow-hidden" />
<div className="bg-transparent w-fit h-[75%] flex flex-col p-1 mt-20 gap-10 z-20">
<div className="flex flex-col items-center justify-center gap-10 min-w-screen">
<div className="flex items-center justify-center">
Expand All @@ -35,17 +35,27 @@ export default async function Index() {
</div>

<div className="flex gap-10 items-center justify-center">
<Links icon='docs' description='Documentation' link='https://docs.keyshade.xyz/' />
<Links icon='github' description='Star on Github' link='https://github.com/keyshade-xyz/keyshade' />
<Links
icon="docs"
description="Documentation"
link="https://docs.keyshade.xyz/"
/>
<Links
icon="github"
description="Star on Github"
link="https://github.com/keyshade-xyz/keyshade"
/>
</div>

<div className="flex items-center justify-center gap-24 mt-20">
<Killers image='kriptonian' twitterUserName='kriptonian8' />
<Killers image='rajdip-b' twitterUserName='RajB47' />
<Killers image="kriptonian" twitterUserName="kriptonian8" />
<Killers image="rajdip-b" twitterUserName="RajB47" />
</div>
</div>
</div>
</div>
</div>
)
}

export default Index
File renamed without changes.
File renamed without changes.
25 changes: 18 additions & 7 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
//@ts-check
const { composePlugins, withNx } = require('@nx/next')

// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')

/** @type {import('next').NextConfig} */
/**
* @type {import('@nx/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = {
distDir: 'dist/.next',
webpack(config, { isServer }) {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack']
})

if (!isServer) {
config.resolve.alias['@public'] = path.join(__dirname, 'public')
// eslint-disable-next-line no-undef
// config.resolve.alias['@public'] = path.join(__dirname, 'public')
}

return config
},
nx: {
// Set this to true if you would like to use SVGR
// See: https://github.com/gregberge/svgr
svgr: false
}
}

module.exports = nextConfig
const plugins = [
// Add more Next.js plugins to this list if needed.
withNx
]

module.exports = composePlugins(...plugins)(nextConfig)
10 changes: 2 additions & 8 deletions apps/web/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,12 @@
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/apps/web"
},
"configurations": {
"development": {
"outputPath": "apps/web"
},
"production": {}
"outputPath": "apps/web/dist"
}
},
"serve": {
"executor": "@nx/next:server",
"defaultConfiguration": "development",
"defaultConfiguration": "production",
"options": {
"buildTarget": "web:build",
"dev": true,
Expand Down
4 changes: 3 additions & 1 deletion apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"../../apps/web/.next/types/**/*.ts",
"../../dist/apps/web/.next/types/**/*.ts",
"next-env.d.ts",
".next/types/**/*.ts"
".next/types/**/*.ts",
"../../apps/web/dist/.next/types/**/*.ts",
"dist/.next/types/**/*.ts"
],
"exclude": [
"node_modules",
Expand Down
5 changes: 5 additions & 0 deletions apps/web/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"installCommand": "pnpm install",
"buildCommand": "pnpm run build:web",
"framework": "nextjs"
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"test:workspace": "nx run workspace:test",
"test:cli": "nx run cli:test",
"test:sdk-node": "nx run sdk-js:test",
"start:web": "nx run web:serve",
"db:seed": "cd apps/api/src/prisma && pnpx ts-node seed.ts",
"db:generate-types": "nx run api:prisma:generate",
"db:generate-migrations": "cd apps/api/src/prisma && pnpx prisma migrate dev --create-only --skip-seed",
Expand Down

0 comments on commit 7a0be5d

Please sign in to comment.