diff --git a/.devcontainer/on-create.sh b/.devcontainer/on-create.sh
index a66491ef7..fbd5351f2 100755
--- a/.devcontainer/on-create.sh
+++ b/.devcontainer/on-create.sh
@@ -9,10 +9,5 @@ npm install
# Copy the env file
cp .env.example .env
-# Source the env file, export the variables
-set -a
-source .env
-set +a
-
# Run the migrations
-npm run -w @documenso/prisma prisma:migrate-dev
+npm run prisma:migrate-dev
diff --git a/.env.example b/.env.example
index 065976bc5..7bd71c04b 100644
--- a/.env.example
+++ b/.env.example
@@ -15,6 +15,11 @@ NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documen
# Defines the URL to use for the database when running migrations and other commands that won't work with a connection pool.
NEXT_PRIVATE_DIRECT_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documenso"
+# [[E2E Tests]]
+E2E_TEST_AUTHENTICATE_USERNAME="Test User"
+E2E_TEST_AUTHENTICATE_USER_EMAIL="testuser@mail.com"
+E2E_TEST_AUTHENTICATE_USER_PASSWORD="test_password"
+
# [[STORAGE]]
# OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3
NEXT_PUBLIC_UPLOAD_TRANSPORT="database"
@@ -68,6 +73,7 @@ NEXT_PRIVATE_STRIPE_API_KEY=
NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET=
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID=
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID=
+NEXT_PUBLIC_STRIPE_FREE_PLAN_ID=
# [[FEATURES]]
# OPTIONAL: Leave blank to disable PostHog and feature flags.
diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
new file mode 100644
index 000000000..f5fdb5166
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -0,0 +1,47 @@
+name: "Bug Report"
+labels: "bug"
+description: Create a bug report to help us improve
+body:
+ - type: markdown
+ attributes:
+ value:
+ Thank you for reporting an issue.
+ Please fill in as much of the form below as you're able to.
+ - type: textarea
+ attributes:
+ label: Issue Description
+ description: Please provide a clear and concise description of the problem.
+ - type: textarea
+ attributes:
+ label: Steps to Reproduce
+ description: Please provide step-by-step instructions to reproduce the issue. Include code snippets, error messages, and any other relevant information.
+ - type: textarea
+ attributes:
+ label: Expected Behavior
+ description: Describe what you expected to happen.
+ - type: textarea
+ attributes:
+ label: Current Behavior
+ description: Describe what is currently happening.
+ - type: textarea
+ attributes:
+ label: Screenshots (optional)
+ description: If applicable, add screenshots to help explain the issue.
+ - type: input
+ attributes:
+ label: Operating System [e.g., Windows 10]
+ - type: input
+ attributes:
+ label: Browser [e.g., Chrome, Firefox]
+ - type: input
+ attributes:
+ label: Version [e.g., 2.0.1]
+ - type: checkboxes
+ attributes:
+ label: Please check the boxes that apply to this issue report.
+ options:
+ - label: I have searched the existing issues to make sure this is not a duplicate.
+ - label: I have provided steps to reproduce the issue.
+ - label: I have included relevant environment information.
+ - label: I have included any relevant screenshots.
+ - label: I understand that this is a voluntary contribution and that there is no guarantee of resolution.
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
new file mode 100644
index 000000000..f323f9475
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -0,0 +1,35 @@
+name: "Feature Request"
+description: Suggest a new idea or enhancement for this project
+body:
+ - type: markdown
+ attributes:
+ value: Please provide a clear and concise title for your feature request
+ - type: textarea
+ attributes:
+ label: Feature Description
+ description: Describe the feature you are requesting in detail. Explain what problem it solves or what value it adds to the project.
+ - type: textarea
+ attributes:
+ label: Use Case
+ description: Provide a scenario or use case where this feature would be beneficial. Explain how users would interact with this feature and why it's important.
+ - type: textarea
+ attributes:
+ label: Proposed Solution
+ description: If you have an idea of how this feature could be implemented, describe it here. Include any technical details, UI/UX considerations, or design suggestions.
+ - type: textarea
+ attributes:
+ label: Alternatives (optional)
+ description: Are there any alternative ways to achieve the same goal? Describe other approaches that could be considered if this feature is not implemented.
+ - type: textarea
+ attributes:
+ label: Additional Context
+ description: Add any additional context or information that might be relevant to the feature request.
+ - type: checkboxes
+ attributes:
+ label: Please check the boxes that apply to this feature request.
+ options:
+ - label: I have searched the existing feature requests to make sure this is not a duplicate.
+ - label: I have provided a detailed description of the requested feature.
+ - label: I have explained the use case or scenario for this feature.
+ - label: I have included any relevant technical details or design suggestions.
+ - label: I understand that this is a suggestion and that there is no guarantee of implementation.
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/improvement.yml b/.github/ISSUE_TEMPLATE/improvement.yml
new file mode 100644
index 000000000..bebcb4cb5
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/improvement.yml
@@ -0,0 +1,35 @@
+name: "General Improvement"
+description: Suggest a minor enhancement or improvement for this project
+body:
+ - type: markdown
+ attributes:
+ value: Please provide a clear and concise title for your improvement suggestion
+ - type: textarea
+ attributes:
+ label: Improvement Description
+ description: Describe the improvement you are suggesting in detail. Explain what specific aspect of the project it addresses or enhances.
+ - type: textarea
+ attributes:
+ label: Rationale
+ description: Explain why this improvement would be beneficial. Share any context, pain points, or reasons for suggesting this change.
+ - type: textarea
+ attributes:
+ label: Proposed Solution
+ description: If you have a suggestion for how this improvement could be implemented, describe it here. Include any technical details, design suggestions, or other relevant information.
+ - type: textarea
+ attributes:
+ label: Alternatives (optional)
+ description: Are there any alternative approaches to achieve the same improvement? Describe other ways to address the issue or enhance the project.
+ - type: textarea
+ attributes:
+ label: Additional Context
+ description: Add any additional context or information that might be relevant to the improvement suggestion.
+ - type: checkboxes
+ attributes:
+ label: Please check the boxes that apply to this improvement suggestion.
+ options:
+ - label: I have searched the existing issues and improvement suggestions to avoid duplication.
+ - label: I have provided a clear description of the improvement being suggested.
+ - label: I have explained the rationale behind this improvement.
+ - label: I have included any relevant technical details or design suggestions.
+ - label: I understand that this is a suggestion and that there is no guarantee of implementation.
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE/generic.md b/.github/PULL_REQUEST_TEMPLATE/generic.md
new file mode 100644
index 000000000..70b668b5c
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/generic.md
@@ -0,0 +1,49 @@
+---
+name: Pull Request
+about: Submit changes to the project for review and inclusion
+---
+
+## Description
+
+
+
+
+## Related Issue
+
+
+
+
+## Changes Made
+
+
+
+
+- Change 1
+- Change 2
+- ...
+
+## Testing Performed
+
+
+
+
+- Tested feature X in scenario Y.
+- Ran unit tests for component Z.
+- Tested on browsers A, B, and C.
+- ...
+
+## Checklist
+
+
+
+
+- [ ] I have tested these changes locally and they work as expected.
+- [ ] I have added/updated tests that prove the effectiveness of these changes.
+- [ ] I have updated the documentation to reflect these changes, if applicable.
+- [ ] I have followed the project's coding style guidelines.
+- [ ] I have addressed the code review feedback from the previous submission, if applicable.
+
+## Additional Notes
+
+
+
diff --git a/.github/PULL_REQUEST_TEMPLATE/test-addition.md b/.github/PULL_REQUEST_TEMPLATE/test-addition.md
new file mode 100644
index 000000000..f93c81493
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/test-addition.md
@@ -0,0 +1,40 @@
+---
+name: Test Addition
+about: Submit a new test, either unit or end-to-end (E2E), for review and inclusion
+---
+
+## Description
+
+
+
+
+## Related Issue
+
+
+
+
+## Test Details
+
+
+
+
+- Test Name: Name of the test
+- Type: [Unit / E2E]
+- Description: Brief description of what the test checks
+- Inputs: What inputs the test uses (if applicable)
+- Expected Output: What output or behavior the test expects
+
+## Checklist
+
+
+
+
+- [ ] I have written the new test and ensured it works as intended.
+- [ ] I have added necessary documentation to explain the purpose of the test.
+- [ ] I have followed the project's testing guidelines and coding style.
+- [ ] I have addressed any review feedback from previous submissions, if applicable.
+
+## Additional Notes
+
+
+
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 74fcb319b..1269fd6c5 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -9,7 +9,7 @@ updates:
labels:
- "ci dependencies"
- "ci"
- open-pull-requests-limit: 2
+ open-pull-requests-limit: 0
- package-ecosystem: "npm"
directory: "/apps/marketing"
@@ -19,7 +19,7 @@ updates:
labels:
- "npm dependencies"
- "frontend"
- open-pull-requests-limit: 2
+ open-pull-requests-limit: 0
- package-ecosystem: "npm"
directory: "/apps/web"
@@ -29,4 +29,4 @@ updates:
labels:
- "npm dependencies"
- "frontend"
- open-pull-requests-limit: 2
+ open-pull-requests-limit: 0
diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml
new file mode 100644
index 000000000..8f0e7bb19
--- /dev/null
+++ b/.github/workflows/e2e-tests.yml
@@ -0,0 +1,51 @@
+name: Playwright Tests
+on:
+ push:
+ branches: [feat/refresh]
+ pull_request:
+ branches: [feat/refresh]
+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
+ with:
+ node-version: 18
+ - name: Install dependencies
+ run: npm ci
+ - name: Copy env
+ run: cp .env.example .env
+ - 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: Run Playwright tests
+ run: npm run ci
+ - uses: actions/upload-artifact@v3
+ if: always()
+ with:
+ name: playwright-report
+ path: playwright-report/
+ 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/.gitignore b/.gitignore
index 246ce8bfe..3b0569b15 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,7 @@ yarn-error.log*
# turbo
.turbo
+.turbo-cookie
# vercel
.vercel
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 000000000..b03003160
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,55 @@
+tasks:
+ - init: |
+ npm i &&
+ npm run dx:up &&
+ cp .env.example .env &&
+ set -a; source .env &&
+ export NEXTAUTH_URL="$(gp url 3000)" &&
+ export NEXT_PUBLIC_WEBAPP_URL="$(gp url 3000)" &&
+ export NEXT_PUBLIC_MARKETING_URL="$(gp url 3001)"
+ command: npm run d
+
+ports:
+ - port: 3000
+ visibility: public
+ onOpen: open-preview
+ - port: 3001
+ visibility: public
+ onOpen: open-preview
+ - port: 9000
+ visibility: public
+ onOpen: ignore
+ - port: 1100
+ visibility: private
+ onOpen: ignore
+ - port: 2500
+ visibility: private
+ onOpen: ignore
+ - port: 54320
+ visibility: private
+ onOpen: ignore
+
+
+github:
+ prebuilds:
+ master: true
+ pullRequests: true
+ pullRequestsFromForks: true
+ addCheck: true
+ addComment: true
+ addBadge: true
+
+vscode:
+ extensions:
+ - aaron-bond.better-comments
+ - bradlc.vscode-tailwindcss
+ - dbaeumer.vscode-eslint
+ - esbenp.prettier-vscode
+ - mikestead.dotenv
+ - unifiedjs.vscode-mdx
+ - GitHub.copilot-chat
+ - GitHub.copilot-labs
+ - GitHub.copilot
+ - GitHub.vscode-pull-request-github
+ - Prisma.prisma
+ - VisualStudioExptTeam.vscodeintellicode
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..5cf6aad4e
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,126 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, caste, color, religion, or sexual
+identity and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+- Demonstrating empathy and kindness toward other people
+- Being respectful of differing opinions, viewpoints, and experiences
+- Giving and gracefully accepting constructive feedback
+- Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+- Focusing on what is best not just for us as individuals, but for the overall
+ community
+
+Examples of unacceptable behavior include:
+
+- The use of sexualized language or imagery, and sexual attention or advances of
+ any kind
+- Trolling, insulting or derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or email address,
+ without their explicit permission
+- Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at
+support@documenso.com.
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series of
+actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or permanent
+ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior, harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within the
+community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.1, available at
+[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
+
+Community Impact Guidelines were inspired by
+[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
+
+For answers to common questions about this code of conduct, see the FAQ at
+[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
+[https://www.contributor-covenant.org/translations][translations].
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index eca35cd8b..e2db661b8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -5,20 +5,36 @@ If you plan to contribute to Documenso, please take a moment to feel awesome ✨
## Before getting started
- Before jumping into a PR be sure to search [existing PRs](https://github.com/documenso/documenso/pulls) or [issues](https://github.com/documenso/documenso/issues) for an open or closed item that relates to your submission.
-- Select and issue from [here](https://github.com/documenso/documenso/issues) or create a new one
-- Consider the results from the discussion in the issue
+- Select an issue from [here](https://github.com/documenso/documenso/issues) or create a new one
+- Consider the results from the discussion on the issue
- Accept the [Contributor License Agreement](https://documen.so/cla) to ensure we can accept your contributions.
+## Taking issues
+
+Before taking an issue, ensure that:
+
+- The issue has been assigned the public label
+- The issue is clearly defined and understood
+- No one has been assigned to the issue
+- No one has expressed intention to work on it
+
+You can then:
+
+1. Comment on the issue with your intention to work on it
+2. Begin work on the issue
+
+Always feel free to ask questions or seek clarification on the issue.
+
## Developing
-The development branch is main. All pull request should be made against this branch. If you need help getting started, [join us on Discord](https://documen.so/discord).
+The development branch is main. All pull requests should be made against this branch. If you need help getting started, [join us on Discord](https://documen.so/discord).
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your
own GitHub account and then
[clone](https://help.github.com/articles/cloning-a-repository/) it to your local device.
2. Create a new branch:
-- Create a new branch (include the issue id and somthing readable):
+- Create a new branch (include the issue id and something readable):
```sh
git checkout -b doc-999-my-feature-or-fix
@@ -29,7 +45,7 @@ The development branch is main. All pull request should be made aga
## Building
> **Note**
-> Please be sure that you can make a full production build before pushing code or creating PRs.
+> Please ensure you can make a full production build before pushing code or creating PRs.
You can build the project with:
diff --git a/README.md b/README.md
index e0fc69d2f..8a8bc88eb 100644
--- a/README.md
+++ b/README.md
@@ -27,16 +27,9 @@
+
+ Our self-hosted option is great for small teams and individuals who need a simple + solution. You can use our docker based setup to get started in minutes. Take control with + full customizability and data ownership. +
+ +
- View our{' '}
+ Create a{' '}
+
+ free account
+ {' '}
+ or view our{' '}
Self Hosted
-Free
+Free Plan
+$0
- For small teams and individuals who need a simple solution + For small teams and individuals with basic needs.
- event('view-github')} - > - - +Host your own instance
-Full Control
-Customizability
-Docker Ready
-Community Support
-Free, Forever
+5 standard documents per month
+Up to 10 recipients per document
+No credit card required
diff --git a/apps/marketing/src/components/(marketing)/single-player-mode/single-player-mode-success.tsx b/apps/marketing/src/components/(marketing)/single-player-mode/single-player-mode-success.tsx
index 0c85fc65c..f92c64c84 100644
--- a/apps/marketing/src/components/(marketing)/single-player-mode/single-player-mode-success.tsx
+++ b/apps/marketing/src/components/(marketing)/single-player-mode/single-player-mode-success.tsx
@@ -4,64 +4,37 @@ import { useEffect, useState } from 'react';
import Link from 'next/link';
-import { Share } from 'lucide-react';
-
import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag';
-import { base64 } from '@documenso/lib/universal/base64';
-import { getFile } from '@documenso/lib/universal/upload/get-file';
+import { DocumentStatus, Signature } from '@documenso/prisma/client';
import { DocumentWithRecipient } from '@documenso/prisma/types/document-with-recipient';
import DocumentDialog from '@documenso/ui/components/document/document-dialog';
import { DocumentDownloadButton } from '@documenso/ui/components/document/document-download-button';
+import { DocumentShareButton } from '@documenso/ui/components/document/document-share-button';
import { SigningCard3D } from '@documenso/ui/components/signing-card';
import { cn } from '@documenso/ui/lib/utils';
import { Button } from '@documenso/ui/primitives/button';
-import { useToast } from '@documenso/ui/primitives/use-toast';
import signingCelebration from '~/assets/signing-celebration.png';
-import ConfettiScreen from '~/components/(marketing)/confetti-screen';
-
-import { DocumentStatus } from '.prisma/client';
+import { ConfettiScreen } from '~/components/(marketing)/confetti-screen';
interface SinglePlayerModeSuccessProps {
className?: string;
document: DocumentWithRecipient;
+ signatures: Signature[];
}
-export const SinglePlayerModeSuccess = ({ className, document }: SinglePlayerModeSuccessProps) => {
+export const SinglePlayerModeSuccess = ({
+ className,
+ document,
+ signatures,
+}: SinglePlayerModeSuccessProps) => {
const { getFlag } = useFeatureFlags();
const isConfettiEnabled = getFlag('marketing_spm_confetti');
const [showDocumentDialog, setShowDocumentDialog] = useState(false);
- const [isFetchingDocumentFile, setIsFetchingDocumentFile] = useState(false);
- const [documentFile, setDocumentFile] = useState {stepsRemaining} step(s) until signed
+ {isValid ? 'Ready for Signing' : `${stepsRemaining} step(s) until signed`}
+ Minimise contract