diff --git a/.env.example b/.env.example index 7bd71c04b..45c26f6be 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,11 @@ NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="secret" +# [[CRYPTO]] +# Application Key for symmetric encryption and decryption +# This should be a random string of at least 32 characters +NEXT_PRIVATE_ENCRYPTION_KEY="CAFEBABE" + # [[AUTH OPTIONAL]] NEXT_PRIVATE_GOOGLE_CLIENT_ID="" NEXT_PRIVATE_GOOGLE_CLIENT_SECRET="" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 725bdac93..fa29ae591 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ env: HUSKY: 0 jobs: - build: - name: Build + build_app: + name: Build App runs-on: ubuntu-latest steps: - name: Checkout @@ -37,3 +37,16 @@ jobs: - name: Build run: npm run build + + build_docker: + name: Build Docker Image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Build Docker Image + run: ./docker/build.sh + diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index a37f001d1..50c25f923 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -8,19 +8,6 @@ jobs: e2e_tests: timeout-minutes: 60 runs-on: ubuntu-latest - services: - postgres: - image: postgres - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -28,24 +15,34 @@ jobs: node-version: 18 - name: Install dependencies run: npm ci + - name: Copy env run: cp .env.example .env + + - name: Start Services + run: npm run dx:up + - name: Install Playwright Browsers run: npx playwright install --with-deps + - name: Generate Prisma Client run: npm run prisma:generate -w @documenso/prisma + - name: Create the database run: npm run prisma:migrate-dev + + - name: Seed the database + run: npm run prisma:seed + - name: Run Playwright tests run: npm run ci + - uses: actions/upload-artifact@v3 if: always() with: - name: playwright-report - path: playwright-report/ + name: test-results + path: "packages/app-tests/**/test-results/*" retention-days: 30 env: - NEXT_PRIVATE_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/documenso - NEXT_PRIVATE_DIRECT_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/documenso TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ vars.TURBO_TEAM }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 38d6f1e73..97d5d1948 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,8 @@ "eslint.validate": ["typescript", "typescriptreact", "javascript", "javascriptreact"], "javascript.preferences.importModuleSpecifier": "non-relative", "javascript.preferences.useAliasesForRenames": false, - "typescript.enablePromptUseWorkspaceTsdk": true + "typescript.enablePromptUseWorkspaceTsdk": true, + "files.eol": "\n", + "editor.tabSize": 2, + "editor.insertSpaces": true } diff --git a/README.md b/README.md index e6f050d8d..89f44a926 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,12 @@ git clone https://github.com/documenso/documenso We support DevContainers for VSCode. [Click here to get started.](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/documenso/documenso) +### Video walkthrough + +If you're a visual learner and prefer to watch a video walkthrough of setting up Documenso locally, check out this video: + +[![Watch the video](https://img.youtube.com/vi/Y0ppIQrEnZs/hqdefault.jpg)](https://youtu.be/Y0ppIQrEnZs) + ## Docker 🚧 Docker containers and images are current in progress. We are actively working on bringing a simple Docker build and publish pipeline for Documenso. @@ -234,7 +240,7 @@ Now you can install the dependencies and build it: ``` npm i -npm run:build:web +npm run build:web npm run prisma:migrate-deploy ``` diff --git a/apps/marketing/content/careers.mdx b/apps/marketing/content/careers.mdx new file mode 100644 index 000000000..69433e127 --- /dev/null +++ b/apps/marketing/content/careers.mdx @@ -0,0 +1,13 @@ +--- +title: Careers at Documenso +--- + +# Careers at Documenso + +So you love Documenso and all the things that we do and now you want to work with us to unlock the future of open signing? + +--- + +## Open Positions + +Unfortunately we have no open positions available at the moment. Our team has grown and so we must grow with it, please check back from time to time as now is not forever and we may be hiring again in the future. diff --git a/apps/marketing/next.config.js b/apps/marketing/next.config.js index d2b20fbb9..9c61e4ada 100644 --- a/apps/marketing/next.config.js +++ b/apps/marketing/next.config.js @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-var-requires */ +const fs = require('fs'); const path = require('path'); const { withContentlayer } = require('next-contentlayer'); @@ -10,16 +11,31 @@ ENV_FILES.forEach((file) => { }); }); +// !: This is a temp hack to get caveat working without placing it back in the public directory. +// !: By inlining this at build time we should be able to sign faster. +const FONT_CAVEAT_BYTES = fs.readFileSync( + path.join(__dirname, '../../packages/assets/fonts/caveat.ttf'), +); + /** @type {import('next').NextConfig} */ const config = { experimental: { - serverActionsBodySizeLimit: '10mb', outputFileTracingRoot: path.join(__dirname, '../../'), + serverActions: { + bodySizeLimit: '50mb', + }, }, reactStrictMode: true, - transpilePackages: ['@documenso/lib', '@documenso/prisma', '@documenso/trpc', '@documenso/ui'], + transpilePackages: [ + '@documenso/assets', + '@documenso/lib', + '@documenso/tailwind-config', + '@documenso/trpc', + '@documenso/ui', + ], env: { NEXT_PUBLIC_PROJECT: 'marketing', + FONT_CAVEAT_URI: `data:font/ttf;base64,${FONT_CAVEAT_BYTES.toString('base64')}`, }, modularizeImports: { 'lucide-react': { diff --git a/apps/marketing/package.json b/apps/marketing/package.json index cc49f85a4..83d13d07c 100644 --- a/apps/marketing/package.json +++ b/apps/marketing/package.json @@ -1,6 +1,6 @@ { "name": "@documenso/marketing", - "version": "0.1.0", + "version": "1.2.3", "private": true, "license": "AGPL-3.0", "scripts": { @@ -13,6 +13,7 @@ "copy:pdfjs": "node ../../scripts/copy-pdfjs.cjs" }, "dependencies": { + "@documenso/assets": "*", "@documenso/lib": "*", "@documenso/tailwind-config": "*", "@documenso/trpc": "*", @@ -23,8 +24,8 @@ "lucide-react": "^0.279.0", "luxon": "^3.4.0", "micro": "^10.0.1", - "next": "14.0.0", - "next-auth": "4.24.3", + "next": "14.0.3", + "next-auth": "4.24.5", "next-contentlayer": "^0.3.4", "next-plausible": "^3.10.1", "perfect-freehand": "^1.2.0", @@ -43,5 +44,13 @@ "@types/node": "20.1.0", "@types/react": "18.2.18", "@types/react-dom": "18.2.7" + }, + "overrides": { + "next-auth": { + "next": "$next" + }, + "next-contentlayer": { + "next": "$next" + } } } diff --git a/apps/marketing/src/app/(marketing)/layout.tsx b/apps/marketing/src/app/(marketing)/layout.tsx index 365d8a5d1..248414b33 100644 --- a/apps/marketing/src/app/(marketing)/layout.tsx +++ b/apps/marketing/src/app/(marketing)/layout.tsx @@ -29,7 +29,7 @@ export default function MarketingLayout({ children }: MarketingLayoutProps) { return (
@@ -41,7 +41,7 @@ export default function MarketingLayout({ children }: MarketingLayoutProps) {
-
{children}
+
{children}