dev 818cc9ab5fca cached
125 files
241.4 KB
62.3k tokens
89 symbols
1 requests
Download .txt
Showing preview only (274K chars total). Download the full file or copy to clipboard to get everything.
Repository: octolane-org/cap.octolane.com
Branch: dev
Commit: 818cc9ab5fca
Files: 125
Total size: 241.4 KB

Directory structure:
gitextract_3ya7ae53/

├── .github/
│   ├── CONTRIBUTING.md
│   ├── CONTRIBUTORS.md
│   ├── ISSUE_TEMPLATE /
│   │   ├── BUG-REPORT.yml
│   │   ├── FEATURE-REQUEST.yml
│   │   └── config.yml
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── settings.yml
├── .gitignore
├── .husky/
│   ├── pre-commit
│   └── pre-push
├── .prettierignore
├── .prettierrc
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── apps/
│   └── web/
│       ├── .gitignore
│       ├── README.md
│       ├── app/
│       │   ├── (default)/
│       │   │   ├── components/
│       │   │   │   ├── Content.tsx
│       │   │   │   ├── Header.tsx
│       │   │   │   ├── Hero.tsx
│       │   │   │   └── ModalVideo.tsx
│       │   │   ├── layout.tsx
│       │   │   └── page.tsx
│       │   ├── api/
│       │   │   ├── auth/
│       │   │   │   └── [...nextauth]/
│       │   │   │       ├── options.ts
│       │   │   │       └── route.ts
│       │   │   └── shareholder/
│       │   │       └── route.ts
│       │   ├── auth/
│       │   │   ├── error/
│       │   │   │   └── page.tsx
│       │   │   ├── signin/
│       │   │   │   ├── components/
│       │   │   │   │   └── GoogleLogin.tsx
│       │   │   │   └── page.tsx
│       │   │   └── signout/
│       │   │       └── page.tsx
│       │   ├── dashboard/
│       │   │   ├── 401-a/
│       │   │   │   └── page.tsx
│       │   │   ├── cap-table/
│       │   │   │   ├── components/
│       │   │   │   │   ├── AddNewOptionForm/
│       │   │   │   │   │   ├── DateField.tsx
│       │   │   │   │   │   ├── Form.tsx
│       │   │   │   │   │   ├── RadioGroupField.tsx
│       │   │   │   │   │   ├── SelectField.tsx
│       │   │   │   │   │   ├── SwitchField.tsx
│       │   │   │   │   │   └── TextField.tsx
│       │   │   │   │   ├── DownloadCaptable.tsx
│       │   │   │   │   └── OptionsTable.tsx
│       │   │   │   ├── new/
│       │   │   │   │   ├── context/
│       │   │   │   │   │   └── new-cap-table.tsx
│       │   │   │   │   ├── page.tsx
│       │   │   │   │   ├── schema.ts
│       │   │   │   │   └── types.ts
│       │   │   │   └── page.tsx
│       │   │   ├── equity-plans/
│       │   │   │   ├── components/
│       │   │   │   │   ├── EquityPlansTable.tsx
│       │   │   │   │   └── NewEquityPlanForm/
│       │   │   │   │       ├── DateField.tsx
│       │   │   │   │       ├── EquityRetired.tsx
│       │   │   │   │       ├── FieldWithType.tsx
│       │   │   │   │       ├── InitialPlanSize.tsx
│       │   │   │   │       ├── ShareClassSelect.tsx
│       │   │   │   │       ├── TermsOfPlan.tsx
│       │   │   │   │       └── index.tsx
│       │   │   │   ├── new/
│       │   │   │   │   └── page.tsx
│       │   │   │   └── page.tsx
│       │   │   ├── layout.tsx
│       │   │   ├── page.tsx
│       │   │   ├── rule-701/
│       │   │   │   └── page.tsx
│       │   │   ├── settings/
│       │   │   │   └── page.tsx
│       │   │   └── share-classes/
│       │   │       ├── components/
│       │   │       │   ├── NewShareClassForm/
│       │   │       │   │   ├── AdvancedSettings.tsx
│       │   │       │   │   ├── ClassType.tsx
│       │   │       │   │   ├── DateField.tsx
│       │   │       │   │   ├── Information.tsx
│       │   │       │   │   ├── RadioGroupField.tsx
│       │   │       │   │   ├── TextField.tsx
│       │   │       │   │   └── index.tsx
│       │   │       │   └── ShareClassesTable.tsx
│       │   │       ├── new/
│       │   │       │   └── page.tsx
│       │   │       └── page.tsx
│       │   ├── globals.css
│       │   ├── layout.tsx
│       │   └── not-found.tsx
│       ├── components/
│       │   ├── CapTableBanner.tsx
│       │   ├── Logo/
│       │   │   ├── Logo.tsx
│       │   │   ├── LogoImage.tsx
│       │   │   └── index.ts
│       │   ├── WorkInProgress.tsx
│       │   ├── layout/
│       │   │   └── NavBar/
│       │   │       └── index.tsx
│       │   └── ui/
│       │       ├── Container.tsx
│       │       ├── Heading.tsx
│       │       ├── If.tsx
│       │       ├── Spinner.tsx
│       │       ├── Tile.tsx
│       │       ├── alert.tsx
│       │       ├── button.tsx
│       │       ├── calendar.tsx
│       │       ├── form.tsx
│       │       ├── input.tsx
│       │       ├── label.tsx
│       │       ├── popover.tsx
│       │       ├── radio-group.tsx
│       │       ├── select.tsx
│       │       ├── switch.tsx
│       │       ├── table.tsx
│       │       └── textarea.tsx
│       ├── components.json
│       ├── content/
│       │   ├── community-digest-summer-edition.mdx
│       │   ├── create-and-deploy-a-blog-with-simple.mdx
│       │   ├── getting-started-with-nextjs.mdx
│       │   ├── getting-started-with-vuejs-and-stripe.mdx
│       │   ├── how-to-identify-high-intent-leads.mdx
│       │   ├── how-to-work-with-friendly-apis.mdx
│       │   ├── introducing-the-testing-field-guide.mdx
│       │   └── why-we-think-simple-is-good-for-developers.mdx
│       ├── contentlayer.config.js
│       ├── core/
│       │   ├── constants/
│       │   │   └── configs.ts
│       │   ├── prisma.ts
│       │   └── types/
│       │       └── common.type.ts
│       ├── global.d.ts
│       ├── lib/
│       │   ├── server/
│       │   │   └── session.ts
│       │   └── utils/
│       │       └── common.ts
│       ├── next.config.js
│       ├── package.json
│       ├── postcss.config.js
│       ├── prisma/
│       │   ├── migrations/
│       │   │   ├── 20240110170446_nextauth_schema/
│       │   │   │   └── migration.sql
│       │   │   ├── 20240110175417_basic_captable/
│       │   │   │   └── migration.sql
│       │   │   ├── 20240111041700_remove_relation_mode/
│       │   │   │   └── migration.sql
│       │   │   ├── 20240111055724_remove_company_as_notnullable_from_user_table/
│       │   │   │   └── migration.sql
│       │   │   └── migration_lock.toml
│       │   └── schema.prisma
│       ├── tailwind.config.js
│       └── tsconfig.json
├── docker-compose.yml
├── package.json
├── pnpm-workspace.yaml
└── turbo.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/CONTRIBUTING.md
================================================
# Contributing

## Request for changes/ Pull Requests

You first need to create a fork of the [cap.octolane.com](https://github.com/octolane-org/cap.octolane.com/) repository to commit your changes to it. Methods to fork a repository can be found in the [GitHub Documentation](https://docs.github.com/en/get-started/quickstart/fork-a-repo).

Then add your fork as a local project:

```sh
# Using HTTPS
git clone https://github.com/octolane-org/cap.octolane.com.git

# Using SSH
git clone git@github.com:octolane-org/cap.octolane.com.git
```

> [Which remote URL should be used ?](https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories)

Then, go to your local folder

```sh
cd cap.octolane.com
```

Add git remote controls :

```sh
# Using HTTPS
git remote add fork https://github.com/YOUR-USERNAME/cap.octolane.com.git
git remote add upstream https://github.com/octolane-org/cap.octolane.com.git


# Using SSH
git remote add fork git@github.com:YOUR-USERNAME/cap.octolane.com.git
git remote add upstream git@github.com/octolane-org/cap.octolane.com.git
```

You can now verify that you have your two git remotes:

```sh
git remote -v
```

## Receive remote updates

In view of staying up to date with the central repository :

```sh
git pull upstream master
```

## Choose a base branch

Before starting development, you need to know which branch to base your modifications/additions on. When in doubt, use master.

| Type of change    |     |              Branches |
| :---------------- | :-: | --------------------: |
| Documentation     |     |              `master` |
| Bug fixes         |     |              `master` |
| New features      |     |              `master` |
| New issues models |     | `YOUR-USERNAME:patch` |

```sh
# Switch to the desired branch
git switch master

# Pull down any upstream changes
git pull

# Create a new branch to work on
git switch --create patch/1234-name-issue
```

Commit your changes, then push the branch to your fork with `git push -u fork` and open a pull request on [the cap.octolane.coms repository](https://github.com/octolane-org/cap.octolane.com/) following the template provided.


================================================
FILE: .github/CONTRIBUTORS.md
================================================
> ## ProTips:
>
> This is maybe the most important file of your project if you think about maintanability and long-term support. It recognizes people who are helping you and, directly or indirectly, baking your/your project success.
>
> Those people spend their time, for free, to make your project better. You should, by all means, praise and thank them whenever you want. Time is an asset that never comes back, so if people choose to use their time with your code, this file shows them the respect they want.

# Contributors

## Special thanks for all the people who had helped this project so far:

> Here you should include a list of people who helped your project. A good practice would be their names and GH profiles. Other additional info may fit, but names and profiles are mandatory. Proper credits matter.

> If you think you can do it better, you can consider using [all-contributors](https://github.com/kentcdodds/all-contributors/) guidelines. This project itself uses it on the README file. You really should consider using them.

## I would like to join this list. How can I help the project?

> Here you could make a call to people who would like to contribute to the project. Below, expose what you expect people to do.

We're currently looking for contributions for the following:

- [ ] Bug fixes
- [ ] Translations
- [ ] etc...

For more information, please refer to our [CONTRIBUTING](CONTRIBUTING.md) guide.


================================================
FILE: .github/ISSUE_TEMPLATE /BUG-REPORT.yml
================================================
name: "🐛 Bug Report"
description: Create a new ticket for a bug.
title: "🐛 [BUG] - <title>"
labels: [
  "bug"
]
body:
  - type: textarea
    id: description
    attributes:
      label: "Description"
      description: Please enter an explicit description of your issue
      placeholder: Short and explicit description of your incident...
    validations:
      required: true
  - type: input
    id: reprod-url
    attributes:
      label: "Reproduction URL"
      description: Please enter your GitHub URL to provide a reproduction of the issue
      placeholder: ex. https://github.com/USERNAME/REPO-NAME
    validations:
      required: true
  - type: textarea
    id: reprod
    attributes:
      label: "Reproduction steps"
      description: Please enter an explicit description of your issue
      value: |
        1. Go to '...'
        2. Click on '....'
        3. Scroll down to '....'
        4. See error
      render: bash
    validations:
      required: true
  - type: textarea
    id: screenshot
    attributes:
      label: "Screenshots"
      description: If applicable, add screenshots to help explain your problem.
      value: |
        ![DESCRIPTION](LINK.png)
      render: bash
    validations:
      required: false
  - type: textarea
    id: logs
    attributes:
      label: "Logs"
      description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
      render: bash
    validations:
      required: false
  - type: dropdown
    id: browsers
    attributes:
      label: "Browsers"
      description: What browsers are you seeing the problem on ?
      multiple: true
      options:
        - Firefox
        - Chrome
        - Safari
        - Microsoft Edge
        - Opera
    validations:
      required: false
  - type: dropdown
    id: os
    attributes:
      label: "OS"
      description: What is the impacted environment ?
      multiple: true
      options:
        - Windows
        - Linux
        - Mac
    validations:
      required: false

================================================
FILE: .github/ISSUE_TEMPLATE /FEATURE-REQUEST.yml
================================================
name: "💡 Feature Request"
description: Create a new ticket for a new feature request
title: "💡 [REQUEST] - <title>"
labels: [
  "question"
]
body:
  - type: input
    id: start_date
    attributes:
      label: "Start Date"
      description: Start of development
      placeholder: "month/day/year"
    validations:
      required: false
  - type: textarea
    id: implementation_pr
    attributes:
      label: "Implementation PR"
      description: Pull request used
      placeholder: "#Pull Request ID"
    validations:
      required: false
  - type: textarea
    id: reference_issues
    attributes:
      label: "Reference Issues"
      description: Common issues
      placeholder: "#Issues IDs"
    validations:
      required: false
  - type: textarea
    id: summary
    attributes:
      label: "Summary"
      description: Provide a brief explanation of the feature
      placeholder: Describe in a few lines your feature request
    validations:
      required: true
  - type: textarea
    id: basic_example
    attributes:
      label: "Basic Example"
      description: Indicate here some basic examples of your feature.
      placeholder: A few specific words about your feature request.
    validations:
      required: true
  - type: textarea
    id: drawbacks
    attributes:
      label: "Drawbacks"
      description: What are the drawbacks/impacts of your feature request ?
      placeholder: Identify the drawbacks and impacts while being neutral on your feature request
    validations:
      required: true
  - type: textarea
    id: unresolved_question
    attributes:
      label: "Unresolved questions"
      description: What questions still remain unresolved ?
      placeholder: Identify any unresolved issues.
    validations:
      required: false

================================================
FILE: .github/ISSUE_TEMPLATE /config.yml
================================================
blank_issues_enabled: false
contact_links:
    - name: One Chowdhury
      url: mailto:one@octolane.com
      about: CEO & Co-Founder @Octolane AI. Please do NOT use this email to post issues or feature requests (only important business/personal contact).
    - name: Abdul Halim Rafi
      url: mailto:rafi@octolane.com
      about: CTO & Co-Founder @Octolane AI. Please do NOT use this email to post issues or feature requests (only important business/personal contact).

================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
# Pull Request Process

## Before submitting a pull request

> Ask contributors to ensure that any install or build dependencies are removed before the end of the layer when doing a build.

## General steps for completing this pull request

Please review the [guidelines for contributing](CONTRIBUTING.md) to this repository.

### Checklist

> Does your project contributions have steps to follow before being approved? Tests, documentation changing, etc?

Ensure that your `pull request` has followed all the steps below:

- [ ] Code compilation
- [ ] Successful build
- [ ] All tests passing
- [ ] Extended the documentation, if applicable
- [ ] Added myself to the AUTHORS file

### Description

> Ask the contributor to describe his `pull request`.

## Proposed changes

> Ask contributors about why you (or your project maintainers) would accept the pull request. If it solves a previous request, also ask to link to that issue.

### Types of changes

> Show in a checkbox-style, the expected types of changes your project is supposed to have:

- [ ] New feature
- [ ] Bugfix
- [ ] So on...


================================================
FILE: .github/settings.yml
================================================
repository:
# Labels: define labels for Issues and Pull Requests
labels:
    - name: 'Type: Bug'
      color: e80c0c
      description: Something isn't working as expected.

    - name: 'Type: Enhancement'
      color: 54b2ff
      description: Suggest an improvement for an existing feature.

    - name: 'Type: Feature'
      color: 54b2ff
      description: Suggest a new feature.

    - name: 'Type: Security'
      color: fbff00
      description: A problem or enhancement related to a security issue.

    - name: 'Type: Question'
      color: 9309ab
      description: Request for information.

    - name: 'Type: Test'
      color: ce54e3
      description: A problem or enhancement related to a test.

    - name: 'Status: Awaiting Review'
      color: 24d15d
      description: Ready for review.

    - name: 'Status: WIP'
      color: 07b340
      description: Currently being worked on.

    - name: 'Status: Waiting'
      color: 38C968
      description: Waiting on something else to be ready.

    - name: 'Status: Stale'
      color: 66b38a
      description: Has had no activity for some time.

    - name: 'Duplicate'
      color: EB862D
      description: Duplicate of another issue.

    - name: 'Invalid'
      color: faef50
      description: This issue doesn't seem right.

    - name: 'Priority: High +'
      color: ff008c
      description: Task is considered higher-priority.

    - name: 'Priority: Low -'
      color: 690a34
      description: Task is considered lower-priority.

    - name: 'Documentation'
      color: 2fbceb
      description: An issue/change with the documentation.

    - name: "Won't fix"
      color: C8D9E6
      description: Reported issue is working as intended.

    - name: '3rd party issue'
      color: e88707
      description: This issue might be caused by a 3rd party script/package/other reasons

    - name: 'Os: Windows'
      color: AEB1C2
      description: Is Windows-specific

    - name: 'Os: Mac'
      color: AEB1C2
      description: Is Mac-specific

    - name: 'Os: Linux'
      color: AEB1C2
      description: Is Linux-specific


================================================
FILE: .gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
dist/

# next.js
.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
.pnpm-debug.log*

# local env files
.env*.local
.env

# vercel
.vercel

# tinybird
.venv
.tinyb

# turbo
.turbo

# typescript
*.tsbuildinfo
next-env.d.ts

# miscellaneous
/pages/api/scripts*
.react-email
.contentlayer
.vscode
*.csv
*.ndjson

================================================
FILE: .husky/pre-commit
================================================
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm format


================================================
FILE: .husky/pre-push
================================================
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm build

================================================
FILE: .prettierignore
================================================
node_modules
pnpm-lock.yaml
.next
.turbo
dist

================================================
FILE: .prettierrc
================================================
{
  "singleQuote": false,
  "trailingComma": "all",
  "arrowParens": "avoid",
  "tabWidth": 2,
  "semi": true,
  "useTabs": false,
  "printWidth": 80,
  "plugins": [
    "prettier-plugin-tailwindcss",
    "@trivago/prettier-plugin-sort-imports"
  ],
  "importOrder": [
    "<THIRD_PARTY_MODULES>",
    "@/core",
    "@/components",
    "@/lib",
    "@/content",
    "@/content",
    "@/utils",
    "@/constants",
    "@/types",
    ".svg",
    "^../(.*)$",
    "^[./]",
    "(?=./styles.module.scss)"
  ],
  "importOrderSeparation": true
}


================================================
FILE: CHANGELOG.md
================================================
# CHANGELOG.md

## [1.0.0] - 2024-01-11

First release


================================================
FILE: LICENSE.md
================================================
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

                            Preamble

The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

0. Definitions.

"This License" refers to version 3 of the GNU Affero General Public License.

"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.

To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

A "covered work" means either the unmodified Program or a work based
on the Program.

To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

1. Source Code.

The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.

A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

The Corresponding Source for a work in source code form is that
same work.

2. Basic Permissions.

All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

6. Conveying Non-Source Forms.

You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

7. Additional Terms.

"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.

An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

11. Patents.

A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".

A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

12. No Surrender of Others' Freedom.

If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

13. Remote Network Interaction; Use with the GNU General Public License.

Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.


================================================
FILE: README.md
================================================
## Introduction

cap.octolane.com is the open-source cap table management infrastructure for all founders and investors. For cloud ☁️ hosted solution to this Cap Table Management, [register here 👉](https://jl1zzmzlaee.typeform.com/to/Fbf4XlNu).

## Features

## Self-Hosting

## Tech Stack

- [Next.js](https://nextjs.org/) – framework
- [LanternDB](https://lantern.dev) – Only database you need for your AI applications
- [TypeScript](https://www.typescriptlang.org/) – language
- [Tailwind](https://tailwindcss.com/) – CSS
- [Upstash](https://upstash.com/) – redis
- [Tinybird](https://tinybird.com/) – analytics
- [NextAuth.js](https://next-auth.js.org/) – auth
- [BoxyHQ](https://boxyhq.com/enterprise-sso) – SSO/SAML
- [Turborepo](https://turbo.build/repo) – monorepo
- [Stripe](https://stripe.com/) – payments
- [Resend](https://resend.com/) – emails
- [Vercel](https://vercel.com/) – deployments

## Contributing

We love our contributors! Here's how you can contribute:

- [Open an issue](https://github.com/octolane-org/cap.octolane.com/issues) if you believe you've encountered a bug.
- Make a [pull request](https://github.com/octolane-org/cap.octolane.com/pulls) to add new features/make quality-of-life improvements/fix bugs.

## License

Inspired by [Dub.co](https://dub.co/), cap.octolane.com is open-source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version. You can [find it here](https://github.com/octolane-org/cap.octolane.com/blob/main/LICENSE.md).


================================================
FILE: apps/web/.gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# contentlayer
.contentlayer


================================================
FILE: apps/web/README.md
================================================
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:

```bash
npm run dev
# or
yarn dev
# or
pnpm 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.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

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.


================================================
FILE: apps/web/app/(default)/components/Content.tsx
================================================
"use client";

import { Transition } from "@headlessui/react";
import { useEffect, useRef, useState } from "react";

const HomepageContent = () => {
  const [tab, setTab] = useState<number>(1);

  const tabs = useRef<HTMLDivElement>(null);

  const heightFix = () => {
    if (tabs.current && tabs.current.parentElement)
      tabs.current.parentElement.style.height = `${tabs.current.clientHeight}px`;
  };

  useEffect(() => {
    heightFix();
  }, []);

  return (
    <section className="relative">
      <div
        className="absolute inset-0 bg-gray-100 pointer-events-none mb-16"
        aria-hidden="true"
      />
      <div className="absolute left-0 right-0 m-auto w-px p-px h-20 bg-gray-200 transform -translate-y-1/2" />

      <div className="relative max-w-6xl mx-auto px-4 sm:px-6">
        <div className="pt-12 md:pt-20">
          {/* Section header */}
          <div className="max-w-3xl mx-auto text-center pb-12 md:pb-16">
            <h1 className="h2 mb-4">Open Source Cap Table Management</h1>
            <p className="text-xl text-gray-600">
              Explore the power of open-source solutions for managing your
              company's equity with precision and ease.
            </p>
          </div>

          {/* Section content */}
          <div className="md:grid md:grid-cols-12 md:gap-6">
            {/* Content */}
            <div
              className="max-w-xl md:max-w-none md:w-full mx-auto md:col-span-7 lg:col-span-6 md:mt-6"
              data-aos="fade-right"
            >
              {/* Tabs buttons */}
              <div className="mb-8 md:mb-0">
                <button
                  className={`text-left flex items-center text-lg p-5 rounded border transition duration-300 ease-in-out mb-3 ${
                    tab !== 1
                      ? "bg-white shadow-md border-gray-200 hover:shadow-lg"
                      : "bg-gray-200 border-transparent"
                  }`}
                  onClick={e => {
                    e.preventDefault();
                    setTab(1);
                  }}
                >
                  <div>
                    <div className="font-bold leading-snug tracking-tight mb-1">
                      Error-Free Updates
                    </div>
                    <div className="text-gray-600">
                      Automated processes ensure your cap table remains accurate
                      and up-to-date, eliminating reconciliation worries.
                    </div>
                  </div>
                  <div className="flex justify-center items-center w-8 h-8 bg-white rounded-full shadow shrink-0 ml-3">
                    <svg
                      className="w-3 h-3 fill-current"
                      viewBox="0 0 12 12"
                      xmlns="http://www.w3.org/2000/svg"
                    >
                      <path d="M11.953 4.29a.5.5 0 00-.454-.292H6.14L6.984.62A.5.5 0 006.12.173l-6 7a.5.5 0 00.379.825h5.359l-.844 3.38a.5.5 0 00.864.445l6-7a.5.5 0 00.075-.534z" />
                    </svg>
                  </div>
                </button>
                <button
                  className={`text-left flex items-center text-lg p-5 rounded border transition duration-300 ease-in-out mb-3 ${
                    tab !== 2
                      ? "bg-white shadow-md border-gray-200 hover:shadow-lg"
                      : "bg-gray-200 border-transparent"
                  }`}
                  onClick={e => {
                    e.preventDefault();
                    setTab(2);
                  }}
                >
                  <div>
                    <div className="font-bold leading-snug tracking-tight mb-1">
                      Collaborative Environment
                    </div>
                    <div className="text-gray-600">
                      Facilitate seamless collaboration among stakeholders with
                      shared access and transparent equity management.
                    </div>
                  </div>
                  <div className="flex justify-center items-center w-8 h-8 bg-white rounded-full shadow shrink-0 ml-3">
                    <svg
                      className="w-3 h-3 fill-current"
                      viewBox="0 0 12 12"
                      xmlns="http://www.w3.org/2000/svg"
                    >
                      <path
                        d="M11.854.146a.5.5 0 00-.525-.116l-11 4a.5.5 0 00-.015.934l4.8 1.921 1.921 4.8A.5.5 0 007.5 12h.008a.5.5 0 00.462-.329l4-11a.5.5 0 00-.116-.525z"
                        fillRule="nonzero"
                      />
                    </svg>
                  </div>
                </button>
                <button
                  className={`text-left flex items-center text-lg p-5 rounded border transition duration-300 ease-in-out mb-3 ${
                    tab !== 3
                      ? "bg-white shadow-md border-gray-200 hover:shadow-lg"
                      : "bg-gray-200 border-transparent"
                  }`}
                  onClick={e => {
                    e.preventDefault();
                    setTab(3);
                  }}
                >
                  <div>
                    <div className="font-bold leading-snug tracking-tight mb-1">
                      Transparent Processes
                    </div>
                    <div className="text-gray-600">
                      Our open-source approach ensures transparency in every
                      aspect of your cap table management.
                    </div>
                  </div>
                  <div className="flex justify-center items-center w-8 h-8 bg-white rounded-full shadow shrink-0 ml-3">
                    <svg
                      className="w-3 h-3 fill-current"
                      viewBox="0 0 12 12"
                      xmlns="http://www.w3.org/2000/svg"
                    >
                      <path
                        d="M11.334 8.06a.5.5 0 00-.421-.237 6.023 6.023 0 01-5.905-6c0-.41.042-.82.125-1.221a.5.5 0 00-.614-.586 6 6 0 106.832 8.529.5.5 0 00-.017-.485z"
                        fill="#18181b"
                        fillRule="nonzero"
                      />
                    </svg>
                  </div>
                </button>
              </div>
            </div>

            {/* Tabs items */}
            <div className="max-w-xl md:max-w-none md:w-full mx-auto md:col-span-5 lg:col-span-6 mb-8 md:mb-0 md:order-1">
              <div className="transition-all">
                <div
                  className="relative flex flex-col text-center lg:text-right"
                  data-aos="zoom-y-out"
                  ref={tabs}
                >
                  {/* Item 1 */}
                  <Transition
                    show={tab === 1}
                    className="w-full"
                    enter="transition ease-in-out duration-700 transform order-first"
                    enterFrom="opacity-0 translate-y-16"
                    enterTo="opacity-100 translate-y-0"
                    leave="transition ease-in-out duration-300 transform absolute"
                    leaveFrom="opacity-100 translate-y-0"
                    leaveTo="opacity-0 -translate-y-16"
                    beforeEnter={() => heightFix()}
                    unmount={false}
                  >
                    <div className="relative inline-flex flex-col">
                      <h1 className="text-5xl md:text-6xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-zinc-800 to-slate-700">
                        Never gonna let you down
                      </h1>
                    </div>
                  </Transition>
                  {/* Item 2 */}
                  <Transition
                    show={tab === 2}
                    className="w-full"
                    enter="transition ease-in-out duration-700 transform order-first"
                    enterFrom="opacity-0 translate-y-16"
                    enterTo="opacity-100 translate-y-0"
                    leave="transition ease-in-out duration-300 transform absolute"
                    leaveFrom="opacity-100 translate-y-0"
                    leaveTo="opacity-0 -translate-y-16"
                    beforeEnter={() => heightFix()}
                    unmount={false}
                  >
                    <div className="relative inline-flex flex-col">
                      <h1 className="text-5xl md:text-6xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-zinc-800 to-slate-700">
                        Never gonna run around
                      </h1>
                    </div>
                  </Transition>
                  {/* Item 3 */}
                  <Transition
                    show={tab === 3}
                    className="w-full"
                    enter="transition ease-in-out duration-700 transform order-first"
                    enterFrom="opacity-0 translate-y-16"
                    enterTo="opacity-100 translate-y-0"
                    leave="transition ease-in-out duration-300 transform absolute"
                    leaveFrom="opacity-100 translate-y-0"
                    leaveTo="opacity-0 -translate-y-16"
                    beforeEnter={() => heightFix()}
                    unmount={false}
                  >
                    <div className="relative inline-flex flex-col">
                      <h1 className="text-5xl md:text-6xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-zinc-800 to-slate-700">
                        And desert you
                      </h1>
                    </div>
                  </Transition>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
};

export default HomepageContent;


================================================
FILE: apps/web/app/(default)/components/Header.tsx
================================================
"use client";

import { useEffect, useState } from "react";

import { configuration } from "@/core/constants/configs";

import Logo from "@/components/Logo";
import { Button } from "@/components/ui/button";

export default function Header() {
  const [top, setTop] = useState<boolean>(true);

  // detect whether user has scrolled the page down by 10px
  const scrollHandler = () => {
    window.scrollY > 10 ? setTop(false) : setTop(true);
  };

  useEffect(() => {
    scrollHandler();
    window.addEventListener("scroll", scrollHandler);
    return () => window.removeEventListener("scroll", scrollHandler);
  }, [top]);

  return (
    <header
      className={`fixed w-full z-30 md:bg-opacity-90 transition duration-300 ease-in-out ${
        !top ? "bg-zinc backdrop-blur-sm shadow-lg" : ""
      }`}
    >
      <div className="max-w-6xl mx-auto px-5 sm:px-6">
        <div className="flex items-center justify-between h-16 md:h-20">
          <div className="shrink-0 mr-4">
            <Logo />
          </div>

          <nav className="hidden md:flex md:grow">
            <ul className="flex grow justify-end flex-wrap items-center">
              <li>
                <Button href={configuration.paths.dashbord}>
                  Live Demo
                  <svg
                    className="w-3 h-3 fill-current text-gray-400 shrink-0 ml-2 -mr-1"
                    viewBox="0 0 12 12"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path
                      d="M11.707 5.293L7 .586 5.586 2l3 3H0v2h8.586l-3 3L7 11.414l4.707-4.707a1 1 0 000-1.414z"
                      fillRule="nonzero"
                    />
                  </svg>
                </Button>
              </li>
            </ul>
          </nav>
        </div>
      </div>
    </header>
  );
}


================================================
FILE: apps/web/app/(default)/components/Hero.tsx
================================================
import VideoThumb from "@/public/images/captable.gif";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

import { Button } from "@/components/ui/button";

import { faDiscord, faGithub } from "@fortawesome/free-brands-svg-icons";

import ModalVideo from "./ModalVideo";

const HomepageHero = () => {
  return (
    <section className="relative">
      {/* Illustration behind hero content */}
      <div
        className="absolute left-1/2 transform -translate-x-1/2 bottom-0 pointer-events-none -z-1"
        aria-hidden="true"
      >
        <svg
          width="1360"
          height="578"
          viewBox="0 0 1360 578"
          xmlns="http://www.w3.org/2000/svg"
        >
          <defs>
            <linearGradient
              x1="50%"
              y1="0%"
              x2="50%"
              y2="100%"
              id="illustration-01"
            >
              <stop stopColor="#FFF" offset="0%" />
              <stop stopColor="#EAEAEA" offset="77.402%" />
              <stop stopColor="#DFDFDF" offset="100%" />
            </linearGradient>
          </defs>
          <g fill="url(#illustration-01)" fillRule="evenodd">
            <circle cx="1232" cy="128" r="128" />
            <circle cx="155" cy="443" r="64" />
          </g>
        </svg>
      </div>

      <div className="max-w-6xl mx-auto px-4 sm:px-6">
        {/* Hero content */}
        <div className="pt-32 pb-12 md:pt-40 md:pb-20">
          {/* Section header */}
          <div className="text-center pb-12 md:pb-16">
            <h1 className="text-4xl md:text-5xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-teal-400">
              Open Source Cap Table Manager
            </h1>{" "}
            <div className="max-w-3xl mx-auto mt-4">
              <p
                className="text-xl text-gray-600 mb-8"
                data-aos="zoom-y-out"
                data-aos-delay="150"
              >
                A Project by Co-Pilot for Sales CRM{" "}
                <a
                  className="font-bold underline bg-clip-text text-transparent bg-gradient-to-r from-zinc-800 to-zinc-600"
                  href="https://octolane.com"
                  target="_blank"
                  rel="noopener noreferrer"
                >
                  Octolane AI
                </a>
              </p>
              <div className="flex justify-center gap-x-6">
                <Button
                  href="https://github.com/octolane-org/cap.octolane.com"
                  target="_blank"
                  className="max-w-xs  sm:max-w-none sm:flex sm:justify-center"
                  data-aos="zoom-y-out"
                  data-aos-delay="300"
                >
                  <FontAwesomeIcon
                    icon={faGithub}
                    className="text-white h-5 w-5 mr-2"
                  />
                  GitHub
                </Button>
                <Button
                  href="https://discord.gg/UWXtkdxc"
                  target="_blank"
                  className="max-w-xs  sm:max-w-none sm:flex sm:justify-center bg-[#404eed]"
                  data-aos="zoom-y-out"
                  data-aos-delay="300"
                >
                  <FontAwesomeIcon
                    icon={faDiscord}
                    className="text-white h-5 w-5 mr-2"
                  />
                  Discord
                </Button>
              </div>
            </div>
          </div>

          {/* Hero image */}
          <ModalVideo
            thumb={VideoThumb}
            thumbWidth={800}
            thumbHeight={432}
            thumbAlt="Follow progress on Twitter"
            video="Follow progress on Twitter"
            videoWidth={1920}
            videoHeight={1080}
          />
        </div>
      </div>
    </section>
  );
};

export default HomepageHero;


================================================
FILE: apps/web/app/(default)/components/ModalVideo.tsx
================================================
"use client";

import { Dialog, Transition } from "@headlessui/react";
import type { StaticImageData } from "next/image";
import Image from "next/image";
import { Fragment, useRef, useState } from "react";

interface ModalVideoProps {
  thumb: StaticImageData;
  thumbWidth: number;
  thumbHeight: number;
  thumbAlt: string;
  video: string;
  videoWidth: number;
  videoHeight: number;
}

export default function ModalVideo({
  thumb,
  thumbWidth,
  thumbHeight,
  thumbAlt,
  video,
  videoWidth,
  videoHeight,
}: ModalVideoProps) {
  const [modalOpen, setModalOpen] = useState<boolean>(false);
  const videoRef = useRef<HTMLVideoElement>(null);

  return (
    <div>
      {/* Video thumbnail */}
      <div>
        <div
          className="relative flex justify-center mb-8"
          data-aos="zoom-y-out"
          data-aos-delay="450"
        >
          <div className="flex flex-col justify-center border shadow-lg">
            <Image
              src={thumb}
              width={thumbWidth}
              height={thumbHeight}
              alt={thumbAlt}
            />
            <svg
              className="absolute inset-0 max-w-full mx-auto md:max-w-none h-auto"
              width="768"
              height="432"
              viewBox="0 0 768 432"
              xmlns="http://www.w3.org/2000/svg"
              xmlnsXlink="http://www.w3.org/1999/xlink"
            >
              <defs>
                <linearGradient
                  x1="50%"
                  y1="0%"
                  x2="50%"
                  y2="100%"
                  id="hero-ill-a"
                >
                  <stop stopColor="#FFF" offset="0%" />
                  <stop stopColor="#EAEAEA" offset="77.402%" />
                  <stop stopColor="#DFDFDF" offset="100%" />
                </linearGradient>
                <linearGradient
                  x1="50%"
                  y1="0%"
                  x2="50%"
                  y2="99.24%"
                  id="hero-ill-b"
                >
                  <stop stopColor="#FFF" offset="0%" />
                  <stop stopColor="#EAEAEA" offset="48.57%" />
                  <stop stopColor="#DFDFDF" stopOpacity="0" offset="100%" />
                </linearGradient>
                <radialGradient
                  cx="21.152%"
                  cy="86.063%"
                  fx="21.152%"
                  fy="86.063%"
                  r="79.941%"
                  id="hero-ill-e"
                >
                  <stop stopColor="#4FD1C5" offset="0%" />
                  <stop stopColor="#81E6D9" offset="25.871%" />
                  <stop stopColor="#338CF5" offset="100%" />
                </radialGradient>
                <circle id="hero-ill-d" cx="384" cy="216" r="64" />
              </defs>
              <g fill="none" fillRule="evenodd">
                <circle
                  fillOpacity=".04"
                  fill="url(#hero-ill-a)"
                  cx="384"
                  cy="216"
                  r="128"
                />
                <circle
                  fillOpacity=".16"
                  fill="url(#hero-ill-b)"
                  cx="384"
                  cy="216"
                  r="96"
                />
              </g>
            </svg>
          </div>
        </div>
      </div>
      {/* End: Video thumbnail */}

      <Transition
        show={modalOpen}
        as={Fragment}
        afterEnter={() => videoRef.current?.play()}
      >
        <Dialog initialFocus={videoRef} onClose={() => setModalOpen(false)}>
          {/* Modal backdrop */}
          <Transition.Child
            className="fixed inset-0 z-[99999] bg-black bg-opacity-75 transition-opacity"
            enter="transition ease-out duration-200"
            enterFrom="opacity-0"
            enterTo="opacity-100"
            leave="transition ease-out duration-100"
            leaveFrom="opacity-100"
            leaveTo="opacity-0"
            aria-hidden="true"
          />
          {/* End: Modal backdrop */}

          {/* Modal dialog */}
          <Transition.Child
            className="fixed inset-0 z-[99999] overflow-hidden flex items-center justify-center transform px-4 sm:px-6"
            enter="transition ease-out duration-200"
            enterFrom="opacity-0 scale-95"
            enterTo="opacity-100 scale-100"
            leave="ttransition ease-out duration-200"
            leaveFrom="oopacity-100 scale-100"
            leaveTo="opacity-0 scale-95"
          >
            <div className="max-w-6xl mx-auto h-full flex items-center">
              <Dialog.Panel className="w-full max-h-full aspect-video bg-black overflow-hidden">
                <video
                  ref={videoRef}
                  width={videoWidth}
                  height={videoHeight}
                  loop
                  controls
                >
                  <source src={video} type="video/mp4" />
                  Your browser does not support the video tag.
                </video>
              </Dialog.Panel>
            </div>
          </Transition.Child>
          {/* End: Modal dialog */}
        </Dialog>
      </Transition>
    </div>
  );
}


================================================
FILE: apps/web/app/(default)/layout.tsx
================================================
"use client";

import AOS from "aos";
import "aos/dist/aos.css";
import { Fragment, useEffect } from "react";

import Header from "./components/Header";

export default function DefaultLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  useEffect(() => {
    AOS.init({
      once: true,
      disable: "phone",
      duration: 700,
      easing: "ease-out-cubic",
    });
  });

  return (
    <Fragment>
      <Header />
      <main className="grow">{children}</main>
      <footer>
        <div className="max-w-6xl mx-auto px-4 sm:px-6">
          <div className="md:flex md:items-center md:justify-between py-4 md:py-8 border-t border-gray-200">
            <ul className="flex mb-4 md:order-1 md:ml-4 md:mb-0">
              <li>
                <a
                  href="https://twitter.com/coffeewithone"
                  className="flex justify-center items-center text-gray-600 hover:text-gray-900 bg-white hover:bg-white-100 rounded-full shadow transition duration-150 ease-in-out"
                  aria-label="Twitter"
                >
                  <svg
                    className="w-8 h-8 fill-current"
                    viewBox="0 0 32 32"
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <path d="m13.063 9 3.495 4.475L20.601 9h2.454l-5.359 5.931L24 23h-4.938l-3.866-4.893L10.771 23H8.316l5.735-6.342L8 9h5.063Zm-.74 1.347h-1.457l8.875 11.232h1.36l-8.778-11.232Z" />
                  </svg>
                </a>
              </li>
            </ul>
            <div className="text-sm text-gray-600 mr-4">
              &copy; No copyright! Absolutely free for public use.
            </div>
          </div>
        </div>
      </footer>
    </Fragment>
  );
}


================================================
FILE: apps/web/app/(default)/page.tsx
================================================
import { Fragment } from "react";

import HomepageContent from "./components/Content";
import HomepageHero from "./components/Hero";

export const metadata = {
  title: "ByeByeCarta.com",
  description: "Open Source Cap Table Manager",
};

export default function Home() {
  return (
    <Fragment>
      <HomepageHero />
      <HomepageContent />
    </Fragment>
  );
}


================================================
FILE: apps/web/app/api/auth/[...nextauth]/options.ts
================================================
import { PrismaAdapter } from "@next-auth/prisma-adapter";
import type { NextAuthOptions } from "next-auth";
import GoogleProvider from "next-auth/providers/google";

import { configuration } from "@/core/constants/configs";
import { prisma } from "@/core/prisma";

export const nextAuthOptions: NextAuthOptions = {
  providers: [
    GoogleProvider({
      clientId: configuration.auth.google.clientId,
      clientSecret: configuration.auth.google.clientSecret,
    }),
  ],
  adapter: PrismaAdapter(prisma),
  secret: configuration.auth.secret,
  callbacks: {
    signIn: params => {
      if (params.user.email?.endsWith("@gmail.com")) {
        throw new Error("You must use a Google Workspace account to sign in.");
      }
      return true;
    },
  },
  pages: {
    error: "/auth/error",
  },
};


================================================
FILE: apps/web/app/api/auth/[...nextauth]/route.ts
================================================
import NextAuth from "next-auth/next";

import { nextAuthOptions } from "./options";

const authHandler = NextAuth(nextAuthOptions);

export { authHandler as GET, authHandler as POST };


================================================
FILE: apps/web/app/api/shareholder/route.ts
================================================
import { HttpStatusCode } from "axios";
import * as yup from "yup";

import { prisma } from "@/core/prisma";

import { checkServerSession } from "@/lib/server/session";

type ShareholderInput = {
  userId: string;
  shareholderType: "individual" | "entity";
};

const shareholderSchema = yup.object().shape({
  userId: yup.string().required("User ID is required"),
  shareholderType: yup.string().required("Shareholder type is required"),
});

export async function POST(request: Request, response: Response) {
  try {
    await checkServerSession();

    const shareholderData: ShareholderInput = await request.json();
    await shareholderSchema.validate(shareholderData, { abortEarly: false });

    const newShareholder = await prisma.shareholder.create({
      data: {
        user: { connect: { id: shareholderData.userId } },
        shareholderType: shareholderData.shareholderType,
      },
    });

    return Response.json(newShareholder, {
      status: HttpStatusCode.Created,
    });
  } catch (error) {
    return Response.json(
      { message: "Something went wrong" },
      { status: HttpStatusCode.InternalServerError },
    );
  }
}


================================================
FILE: apps/web/app/auth/error/page.tsx
================================================
import { nextAuthOptions } from "@/app/api/auth/[...nextauth]/options";
import { getServerSession } from "next-auth";
import { redirect } from "next/navigation";

import { configuration } from "@/core/constants/configs";
import { ServerPageProps } from "@/core/types/common.type";

import GoogleLogin from "../signin/components/GoogleLogin";

const AuthErrorPage = async ({
  searchParams,
}: ServerPageProps<any, { error: string }>) => {
  const session = await getServerSession(nextAuthOptions);

  if (session?.user) {
    redirect(configuration.paths.dashbord);
  }

  return (
    <div className="h-full min-h-svh flex flex-col items-center justify-center gap-8">
      <h1 className="text-2xl font-bold">Error while sign in!</h1>
      <p className="text-red-500">{searchParams.error}</p>
      <GoogleLogin />
    </div>
  );
};

export default AuthErrorPage;


================================================
FILE: apps/web/app/auth/signin/components/GoogleLogin.tsx
================================================
"use client";

import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { signIn } from "next-auth/react";

import { Button } from "@/components/ui/button";

import { faGoogle } from "@fortawesome/free-brands-svg-icons";

export default function GoogleLogin() {
  return (
    <Button
      onClick={() => {
        try {
          signIn("google");
        } catch (error) {
          console.log(error);
        }
      }}
    >
      <FontAwesomeIcon icon={faGoogle} className="text-white h-5 w-5 mr-2" />
      Signin with Google
    </Button>
  );
}


================================================
FILE: apps/web/app/auth/signin/page.tsx
================================================
import { nextAuthOptions } from "@/app/api/auth/[...nextauth]/options";
import { getServerSession } from "next-auth";
import { redirect } from "next/navigation";

import { configuration } from "@/core/constants/configs";

import GoogleLogin from "./components/GoogleLogin";

const SigninPage = async () => {
  const session = await getServerSession(nextAuthOptions);

  console.log(session);

  if (session?.user) {
    redirect(configuration.paths.dashbord);
  }

  return (
    <div className="h-full min-h-svh flex flex-col items-center justify-center gap-8">
      <h1 className="text-2xl font-bold">Welcome Back!</h1>
      <GoogleLogin />
    </div>
  );
};

export default SigninPage;


================================================
FILE: apps/web/app/auth/signout/page.tsx
================================================
"use client";

import { signOut, useSession } from "next-auth/react";
import { useEffect } from "react";

const SignOutPage = () => {
  useEffect(() => {
    signOut({ callbackUrl: "/" });
  }, []);

  return null;
};

export default SignOutPage;


================================================
FILE: apps/web/app/dashboard/401-a/page.tsx
================================================
import WorkInProgress from "@/components/WorkInProgress";

export const metadata = {
  title: "401 A",
};

const FourZeroOneAPage = () => {
  return (
    <div>
      <WorkInProgress />
    </div>
  );
};

export default FourZeroOneAPage;


================================================
FILE: apps/web/app/dashboard/cap-table/components/AddNewOptionForm/DateField.tsx
================================================
import { CalendarIcon } from "@radix-ui/react-icons";
import { format } from "date-fns";

import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/components/ui/popover";

import { cn } from "@/lib/utils/common";

import { useNewCapTableContext } from "../../new/context/new-cap-table";
import { NewOptionsFormFieldType } from "../../new/types";

const DateField = ({
  name,
  label,
  placeholder = "MM/DD/YYYY",
}: NewOptionsFormFieldType) => {
  const { addOptionForm } = useNewCapTableContext();

  return (
    <FormField
      control={addOptionForm?.control}
      name={name}
      render={({ field }) => (
        <FormItem className="flex flex-col">
          <FormLabel>{label}</FormLabel>
          <Popover>
            <PopoverTrigger asChild>
              <FormControl>
                <Button
                  variant={"outline"}
                  className={cn(
                    "pl-3 text-left font-normal",
                    !field.value && "text-muted-foreground",
                  )}
                >
                  {field.value ? (
                    format(field.value as number, "MM/dd/yyyy")
                  ) : (
                    <span>{placeholder}</span>
                  )}
                  <CalendarIcon className="ml-auto h-4 w-4 opacity-50" />
                </Button>
              </FormControl>
            </PopoverTrigger>
            <PopoverContent className="w-auto p-0" align="start">
              <Calendar
                mode="single"
                selected={field.value as Date}
                onSelect={field.onChange}
                disabled={date =>
                  date > new Date() || date < new Date("1900-01-01")
                }
                initialFocus
              />
            </PopoverContent>
          </Popover>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default DateField;


================================================
FILE: apps/web/app/dashboard/cap-table/components/AddNewOptionForm/Form.tsx
================================================
"use client";

import { useRouter } from "next/navigation";
import { toast } from "sonner";

import { configuration } from "@/core/constants/configs";

import Tile from "@/components/ui/Tile";
import { Button } from "@/components/ui/button";
import {
  Form,
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";

import { useNewCapTableContext } from "../../new/context/new-cap-table";
import { NewOptionsFormValues } from "../../new/schema";

import DateField from "./DateField";
import RadioGroupField from "./RadioGroupField";
import SelectField from "./SelectField";
import SwitchField from "./SwitchField";
import TextField from "./TextField";

const AddNewOptionForm = () => {
  const router = useRouter();
  const { addOptionForm } = useNewCapTableContext();

  if (!addOptionForm) {
    return null; // or your fallback UI
  }

  const quantity = addOptionForm.watch("quantity");
  const exercisePrice = addOptionForm.watch("exercisePrice");

  function onSubmit(values: NewOptionsFormValues) {
    toast.success("Share Class Created!");
    router.push(configuration.paths.capTables.all);
  }

  return (
    <Form {...addOptionForm}>
      <form
        onSubmit={addOptionForm?.handleSubmit(onSubmit)}
        className="space-y-8"
      >
        <Tile>
          <h3 className="text-lg font-semibold">1. Select Class Type</h3>
          <SwitchField label="Early Exercise" name="isEarlyExercise" />
        </Tile>

        <Tile>
          <h3 className="text-lg font-semibold">
            2. Add Stakeholder Information
          </h3>
          <SelectField
            label="Stakeholder Name"
            name="stakeholderId"
            selectOptions={[
              {
                label: "John Doe (john@example.com)",
                value: "john-doe",
              },
              {
                label: "Jane Doe (jane@example.com)",
                value: "jane-doe",
              },
            ]}
          />
        </Tile>

        <Tile>
          <h3 className="text-lg font-semibold">3. Fill Out Information</h3>
          <TextField
            inputType="number"
            label="Quantity (Options)"
            name="quantity"
          />
          <TextField
            inputType="number"
            label="Exercise Price ($)"
            name="exercisePrice"
          />
          <FormItem>
            <FormLabel>Cost to Exercise ($)</FormLabel>
            <Input
              value={
                quantity && exercisePrice
                  ? (quantity * exercisePrice).toFixed(2)
                  : 0
              }
              disabled
            />
          </FormItem>
          <DateField label="Issued On" name="issuedOn" />
          <RadioGroupField label="Includes Vesting" name="includeVesting" />
          <SelectField
            label="Option Grant Type"
            name="grantType"
            selectOptions={[
              {
                label: "ISO (Incentive Stock Option)",
                value: "ISO",
              },
              {
                label: "NSO (Non-Qualified Stock Option)",
                value: "NSO",
              },
              {
                label: "INTL (International)",
                value: "INTL",
              },
              {
                label: "EMI (Enterprise Management Incentive)",
                value: "EMI",
              },
            ]}
          />
        </Tile>

        <Tile>
          <h3 className="text-lg font-semibold">
            4. Review Pre-filled Details
          </h3>
          <SelectField
            label="Equity Plan"
            name="equityPlanId"
            selectOptions={[
              {
                label: "EQ-1",
                value: "eq-1",
              },
            ]}
          />
          <SelectField
            label="Federal Exemption"
            name="equityPlanId"
            selectOptions={[
              {
                label: "Rule 701",
                value: "Rule 701",
              },
              {
                label: "Rule 4(a)(2)",
                value: "Rule 4(a)(2)",
              },
              {
                label: "Reg D - 506(b)",
                value: "Reg D - 506(b)",
              },
              {
                label: "Reg D - 506(c)",
                value: "Reg D - 506(c)",
              },
              {
                label: "Reg S",
                value: "Reg S",
              },
              {
                label: "Non US",
                value: "Non US",
              },
              {
                label: "Other",
                value: "Other",
              },
            ]}
          />
          <FormField
            control={addOptionForm?.control}
            name="stateExemption"
            render={({ field }) => (
              <FormItem>
                <FormLabel>State Exemption</FormLabel>
                <FormControl>
                  <Textarea className="resize-none" {...field} />
                </FormControl>
                <FormMessage />
              </FormItem>
            )}
          />
          <DateField label="Expiration Date" name="expirationDate" />
          <SelectField
            label="Currency"
            name="currency"
            selectOptions={[
              {
                label: "USD ($)",
                value: "USD",
              },
              {
                label: "CAD ($)",
                value: "CAD",
              },
              {
                label: "Euro (€)",
                value: "Euro",
              },
            ]}
          />
          <div className="flex gap-2">
            <TextField
              className="grow"
              label="Prefix"
              name="certificatePrefix"
            />
            <TextField
              className="grow"
              label="Certificate ID"
              name="certificateNumber"
            />
          </div>
        </Tile>

        <div className="flex justify-end">
          <Button type="submit" className="w-full max-w-xs">
            Save and Continue
          </Button>
        </div>
      </form>
    </Form>
  );
};

export default AddNewOptionForm;


================================================
FILE: apps/web/app/dashboard/cap-table/components/AddNewOptionForm/RadioGroupField.tsx
================================================
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";

import { useNewCapTableContext } from "../../new/context/new-cap-table";
import { NewOptionsFormFieldType } from "../../new/types";

const RadioGroupField = ({
  label,
  name,
  selectOptions,
}: NewOptionsFormFieldType) => {
  const { addOptionForm } = useNewCapTableContext();

  return (
    <FormField
      control={addOptionForm?.control}
      name={name}
      render={({ field }) => (
        <FormItem className="space-y-3">
          <FormLabel>{label}</FormLabel>
          <FormControl>
            <RadioGroup
              onValueChange={field.onChange}
              defaultValue={field.value as string}
              className="flex gap-6"
            >
              {selectOptions?.map(option => (
                <FormItem
                  className="flex items-center space-x-3 space-y-0"
                  key={option.value}
                >
                  <FormControl>
                    <RadioGroupItem value={option.value} />
                  </FormControl>
                  <FormLabel className="font-normal">{option.label}</FormLabel>
                </FormItem>
              ))}
            </RadioGroup>
          </FormControl>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default RadioGroupField;


================================================
FILE: apps/web/app/dashboard/cap-table/components/AddNewOptionForm/SelectField.tsx
================================================
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select";

import { useNewCapTableContext } from "../../new/context/new-cap-table";
import { NewOptionsFormFieldType } from "../../new/types";

const SelectField = ({
  label,
  name,
  placeholder = "",
  selectOptions,
}: NewOptionsFormFieldType) => {
  const { addOptionForm } = useNewCapTableContext();

  return (
    <FormField
      control={addOptionForm?.control}
      name={name}
      render={({ field }) => (
        <FormItem>
          <FormLabel>{label}</FormLabel>
          <Select
            onValueChange={field.onChange}
            defaultValue={field.value as string}
          >
            <FormControl>
              <SelectTrigger>
                <SelectValue placeholder={placeholder} />
              </SelectTrigger>
            </FormControl>
            <SelectContent>
              {selectOptions?.map(option => (
                <SelectItem key={option.value} value={option.value}>
                  {option.label}
                </SelectItem>
              ))}
            </SelectContent>
          </Select>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default SelectField;


================================================
FILE: apps/web/app/dashboard/cap-table/components/AddNewOptionForm/SwitchField.tsx
================================================
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
} from "@/components/ui/form";
import { Switch } from "@/components/ui/switch";

import { useNewCapTableContext } from "../../new/context/new-cap-table";
import { NewOptionsFormFieldType } from "../../new/types";

const SwitchField = ({ name, label }: NewOptionsFormFieldType) => {
  const { addOptionForm } = useNewCapTableContext();

  return (
    <FormField
      control={addOptionForm?.control}
      name={name}
      render={({ field }) => (
        <FormItem className="flex flex-col">
          <FormLabel className="mt-4">{label}</FormLabel>
          <FormControl>
            <Switch
              checked={field.value as boolean}
              onCheckedChange={field.onChange}
            />
          </FormControl>
        </FormItem>
      )}
    />
  );
};

export default SwitchField;


================================================
FILE: apps/web/app/dashboard/cap-table/components/AddNewOptionForm/TextField.tsx
================================================
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";

import { useNewCapTableContext } from "../../new/context/new-cap-table";
import { NewOptionsFormFieldType } from "../../new/types";

const TextField = ({
  name,
  label,
  className,
  placeholder = "",
  inputType = "text",
}: NewOptionsFormFieldType) => {
  const { addOptionForm } = useNewCapTableContext();

  return (
    <FormField
      control={addOptionForm?.control}
      name={name}
      render={({ field }) => (
        <FormItem className={className}>
          <FormLabel>{label}</FormLabel>
          <FormControl>
            <Input
              placeholder={placeholder}
              {...field}
              type={inputType}
              value={field.value as string}
              onChange={e => {
                const isNumber = inputType === "number";
                const value = isNumber
                  ? Number(e.target.value)
                  : e.target.value;
                field.onChange(value);
              }}
            />
          </FormControl>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default TextField;


================================================
FILE: apps/web/app/dashboard/cap-table/components/DownloadCaptable.tsx
================================================
"use client";

import { toast } from "sonner";

import { Button } from "@/components/ui/button";

const DownloadCaptable = () => {
  const downloadCapTable = () => {
    toast.info("Downloading cap table in progress...");
  };

  return (
    <Button variant="outline" onClick={downloadCapTable}>
      Download Cap Table
    </Button>
  );
};

export default DownloadCaptable;


================================================
FILE: apps/web/app/dashboard/cap-table/components/OptionsTable.tsx
================================================
import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table";

import { formatCurrency } from "@/lib/utils/common";

type OptionCapTable = {
  id: string;
  certificateName: string;
  stakeholderName: string;
  shareClassName: string;
  issuedOn: string;
  fullyDiluted: number;
  ownership: number;
  pricePerShare: number | null;
  excercisePrice: number;
};

const mockOptionsData: OptionCapTable[] = [
  {
    id: "1",
    certificateName: "OPT-1",
    stakeholderName: "John Doe",
    shareClassName: "Common",
    issuedOn: "1/1/2020",
    fullyDiluted: 1000,
    ownership: 100,
    pricePerShare: 1,
    excercisePrice: 100,
  },
  {
    id: "2",
    certificateName: "OPT-1",
    stakeholderName: "Jane Doe",
    shareClassName: "Common",
    issuedOn: "1/1/2020",
    fullyDiluted: 1000,
    ownership: 100,
    pricePerShare: 1,
    excercisePrice: 1500,
  },
];

const EquityPlansTable = () => {
  return (
    <Table>
      <TableHeader>
        <TableRow>
          <TableHead className="w-[100px]">Certificate</TableHead>
          <TableHead>Stakeholder</TableHead>
          <TableHead>Share Class</TableHead>
          <TableHead className="text-right">Issued On</TableHead>
          <TableHead className="text-right">Fully Diluted</TableHead>
          <TableHead className="text-right">Ownership</TableHead>
          <TableHead className="text-right">Price/Share</TableHead>
          <TableHead className="text-right">Excercise Price</TableHead>
        </TableRow>
      </TableHeader>
      <TableBody>
        {mockOptionsData.map(plan => (
          <TableRow key={plan.id}>
            <TableCell className="font-medium">
              {plan.certificateName}
            </TableCell>
            <TableCell>{plan.stakeholderName}</TableCell>
            <TableCell>{plan.shareClassName}</TableCell>
            <TableCell className="text-right">{plan.issuedOn}</TableCell>
            <TableCell className="text-right">{plan.fullyDiluted}</TableCell>
            <TableCell className="text-right">{plan.ownership}%</TableCell>
            <TableCell className="text-right">
              {plan.pricePerShare ? formatCurrency(plan.pricePerShare) : "--"}
            </TableCell>
            <TableCell className="text-right">
              {formatCurrency(plan.excercisePrice)}
            </TableCell>
          </TableRow>
        ))}
      </TableBody>
    </Table>
  );
};

export default EquityPlansTable;


================================================
FILE: apps/web/app/dashboard/cap-table/new/context/new-cap-table.tsx
================================================
"use client";

import { createContext, useContext } from "react";
import { UseFormReturn, useForm } from "react-hook-form";

import { NewOptionsFormValues } from "../schema";

type NewCapTableContextType = {
  addOptionForm?: UseFormReturn<NewOptionsFormValues>;
};

export const NewCapTableContext = createContext<NewCapTableContextType>({});

export const useNewCapTableContext = () => useContext(NewCapTableContext);

export const NewCapTableProvider: React.FCC = ({ children }) => {
  const addOptionForm = useForm<NewOptionsFormValues>({
    defaultValues: {
      signedDocuments: [],
      isEarlyExercise: false,

      stakeholderId: "",
      quantity: 0,
      exercisePrice: 0.0001,
      issuedOn: new Date(),
      includeVesting: "No Vesting",
      grantType: "ISO",

      // Review Pre-filled Details
      equityPlanId: "eq-1",
      federalExemption: "Rule 701",
      stateExemption: "",
      expirationDate: null,
      currency: "USD",
      certificatePrefix: "OPT",
      certificateNumber: 1,
    },
  });

  return (
    <NewCapTableContext.Provider value={{ addOptionForm }}>
      {children}
    </NewCapTableContext.Provider>
  );
};


================================================
FILE: apps/web/app/dashboard/cap-table/new/page.tsx
================================================
import Container from "@/components/ui/Container";
import Tile from "@/components/ui/Tile";

import AddNewOptionForm from "../components/AddNewOptionForm/Form";

import { NewCapTableProvider } from "./context/new-cap-table";

export const metadata = {
  title: "Add to Cap Table",
};

const NewOptionCapTablePage = async () => {
  return (
    <div className="h-full flex flex-col gap-8">
      <Container className="max-w-3xl ml-0">
        <Tile className="mb-5">
          <h1 className="text-2xl font-bold">Record Options</h1>
          <p className="text-xs text-zinc-600">
            Keep track of options that were issued outside of Pulley.
          </p>
        </Tile>
        <NewCapTableProvider>
          <AddNewOptionForm />
        </NewCapTableProvider>
      </Container>
    </div>
  );
};

export default NewOptionCapTablePage;


================================================
FILE: apps/web/app/dashboard/cap-table/new/schema.ts
================================================
import * as z from "zod";

export const newOptionsFormSchema = z.object({
  // Attach Signed Option Grants
  signedDocuments: z.array(z.string()),
  isEarlyExercise: z.boolean(),

  stakeholderId: z.string().min(1),
  quantity: z.number().min(1),
  exercisePrice: z.number().min(0.0001),
  issuedOn: z.date(),
  includeVesting: z.enum(["No Vesting", "Vesting", "Multi-Tranche Vesting"]),
  grantType: z.enum(["ISO", "NSO", "INTL", "EMI"]),

  // Review Pre-filled Details
  equityPlanId: z.string().min(1),
  federalExemption: z.enum([
    "Rule 701",
    "Rule 4(a)(2)",
    "Reg D - 506(b)",
    "Reg D - 506(c)",
    "Reg S",
    "Non US",
    "Other",
  ]),
  stateExemption: z.string(),
  expirationDate: z.date().nullable(),
  currency: z.string().min(1),
  certificatePrefix: z.string().min(1),
  certificateNumber: z.number(),
});

export type NewOptionsFormValues = z.infer<typeof newOptionsFormSchema>;


================================================
FILE: apps/web/app/dashboard/cap-table/new/types.ts
================================================
import { HTMLInputTypeAttribute } from "react";

import { NewOptionsFormValues } from "./schema";

export type NewOptionsFormFieldType = {
  label: string;
  placeholder?: string;
  className?: string;
  inputType?: HTMLInputTypeAttribute;
  name: keyof NewOptionsFormValues;
  selectOptions?: Array<{ label: string; value: string }>;
};


================================================
FILE: apps/web/app/dashboard/cap-table/page.tsx
================================================
import { configuration } from "@/core/constants/configs";

import Container from "@/components/ui/Container";
import Tile from "@/components/ui/Tile";
import { Button } from "@/components/ui/button";

import DownloadCaptable from "./components/DownloadCaptable";
import OptionsTable from "./components/OptionsTable";

export const metadata = {
  title: "Cap Table",
};

const CapTablePage = async () => {
  return (
    <div className="h-full flex flex-col items-center gap-8">
      <Container>
        <Tile>
          <div className="flex items-center justify-between w-full">
            <h1 className="text-2xl font-bold">Cap Table</h1>
            <div className="flex gap-2">
              <DownloadCaptable />
              <Button href={configuration.paths.capTables.new}>
                Add Signed Options
              </Button>
            </div>
          </div>
          <OptionsTable />
        </Tile>
      </Container>
    </div>
  );
};

export default CapTablePage;


================================================
FILE: apps/web/app/dashboard/equity-plans/components/EquityPlansTable.tsx
================================================
import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table";

type EquityPlan = {
  id: string;
  name: string;
  status: string;
  boardApproval: string;
  shareSize: number;
  shareRetireSize: number;
  termOfPlan: string;
  ownership: number;
};

const mockEquityPlans: EquityPlan[] = [
  {
    id: "1",
    name: "EQ1",
    status: "Outstanding",
    boardApproval: "Jan 23, 2024",
    shareSize: 1000,
    shareRetireSize: 100,
    termOfPlan: "10 years",
    ownership: 100,
  },
  {
    id: "2",
    name: "EQ2",
    status: "Outstanding",
    boardApproval: "Jan 23, 2024",
    shareSize: 1000,
    shareRetireSize: 100,
    termOfPlan: "10 years",
    ownership: 100,
  },
  {
    id: "3",
    name: "EQ3",
    status: "Outstanding",
    boardApproval: "Jan 23, 2024",
    shareSize: 1000,
    shareRetireSize: 100,
    termOfPlan: "10 years",
    ownership: 100,
  },
];

const EquityPlansTable = () => {
  return (
    <Table>
      <TableHeader>
        <TableRow>
          <TableHead className="w-[100px]">Name</TableHead>
          <TableHead>Status</TableHead>
          <TableHead>Board Approval</TableHead>
          <TableHead className="text-right">Plan Size</TableHead>
          <TableHead className="text-right">Term of Plan</TableHead>
          <TableHead className="text-right">Ownership</TableHead>
        </TableRow>
      </TableHeader>
      <TableBody>
        {mockEquityPlans.map(plan => (
          <TableRow key={plan.id}>
            <TableCell className="font-medium">{plan.name}</TableCell>
            <TableCell>{plan.status}</TableCell>
            <TableCell>{plan.boardApproval}</TableCell>
            <TableCell className="text-right">
              <p className="text-sm">{plan.shareSize} shares</p>
              <p className="text-xs">
                {plan.shareSize - plan.shareRetireSize} available
              </p>
            </TableCell>
            <TableCell className="text-right">{plan.termOfPlan}</TableCell>
            <TableCell className="text-right">{plan.ownership}%</TableCell>
          </TableRow>
        ))}
      </TableBody>
    </Table>
  );
};

export default EquityPlansTable;


================================================
FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/DateField.tsx
================================================
import { CalendarIcon } from "@radix-ui/react-icons";
import { format } from "date-fns";
import { Control } from "react-hook-form";
import * as z from "zod";

import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/components/ui/popover";

import { cn } from "@/lib/utils/common";

import { newEquityPlanFormSchema } from ".";

const DateField = ({
  control,
  name,
  label,
  placeholder = "MM/DD/YYYY",
}: {
  label: string;
  placeholder?: string;
  name: keyof z.infer<typeof newEquityPlanFormSchema>;
  control: Control<z.infer<typeof newEquityPlanFormSchema>>;
}) => {
  return (
    <FormField
      control={control}
      name={name}
      render={({ field }) => (
        <FormItem className="flex flex-col">
          <FormLabel>{label}</FormLabel>
          <Popover>
            <PopoverTrigger asChild>
              <FormControl>
                <Button
                  variant={"outline"}
                  className={cn(
                    "pl-3 text-left font-normal",
                    !field.value && "text-muted-foreground",
                  )}
                >
                  {field.value ? (
                    format(field.value as number, "MM/dd/yyyy")
                  ) : (
                    <span>{placeholder}</span>
                  )}
                  <CalendarIcon className="ml-auto h-4 w-4 opacity-50" />
                </Button>
              </FormControl>
            </PopoverTrigger>
            <PopoverContent className="w-auto p-0" align="start">
              <Calendar
                mode="single"
                selected={field.value as Date}
                onSelect={field.onChange}
                disabled={date =>
                  date > new Date() || date < new Date("1900-01-01")
                }
                initialFocus
              />
            </PopoverContent>
          </Popover>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default DateField;


================================================
FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/EquityRetired.tsx
================================================
import { Control } from "react-hook-form";
import * as z from "zod";

import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";

import { newEquityPlanFormSchema } from "./index";

const EquityRetired = ({
  control,
}: {
  control: Control<z.infer<typeof newEquityPlanFormSchema>>;
}) => {
  return (
    <FormField
      control={control}
      name="equityRetired"
      render={({ field }) => (
        <FormItem>
          <FormLabel>Equity Retired</FormLabel>
          <FormControl>
            <Input
              placeholder=""
              {...field}
              type="number"
              onChange={e => field.onChange(Number(e.target.value))}
            />
          </FormControl>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default EquityRetired;


================================================
FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/FieldWithType.tsx
================================================
import { HTMLInputTypeAttribute } from "react";
import { Control } from "react-hook-form";
import * as z from "zod";

import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select";

import { newEquityPlanFormSchema } from "./index";

type Props = {
  label: string;
  type?: HTMLInputTypeAttribute;
  nameOfValue: keyof z.infer<typeof newEquityPlanFormSchema>;
  nameOfValueType: keyof z.infer<typeof newEquityPlanFormSchema>;
  control: Control<z.infer<typeof newEquityPlanFormSchema>>;
  typeOptions: Array<{
    label: string;
    value: string;
  }>;
};

const FieldWithType = ({
  label,
  control,
  type = "text",
  nameOfValue,
  nameOfValueType,
  typeOptions,
}: Props) => {
  return (
    <div className="flex flex-col items-start">
      <FormLabel>{label}</FormLabel>
      <div className="flex w-full items-start gap-2 mt-2">
        <FormField
          control={control}
          name={nameOfValue}
          render={({ field }) => (
            <FormItem className="flex-grow">
              <FormControl>
                <Input
                  {...field}
                  type={type}
                  value={field.value as string}
                  onChange={e => {
                    const isNumber = type === "number";
                    const value = isNumber
                      ? Number(e.target.value)
                      : e.target.value;
                    field.onChange(value);
                  }}
                />
              </FormControl>
              <FormMessage />
            </FormItem>
          )}
        />
        <FormField
          control={control}
          name={nameOfValueType}
          render={({ field }) => (
            <FormItem className="flex-grow">
              <Select
                onValueChange={field.onChange}
                defaultValue={field.value as string}
              >
                <FormControl>
                  <SelectTrigger>
                    <SelectValue />
                  </SelectTrigger>
                </FormControl>
                <SelectContent>
                  {typeOptions.map(option => (
                    <SelectItem value={option.value} key={option.value}>
                      {option.label}
                    </SelectItem>
                  ))}
                </SelectContent>
              </Select>
              <FormMessage />
            </FormItem>
          )}
        />
      </div>
    </div>
  );
};

export default FieldWithType;


================================================
FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/InitialPlanSize.tsx
================================================
import { Control } from "react-hook-form";
import * as z from "zod";

import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";

import { newEquityPlanFormSchema } from "./index";

const InitialPlanSize = ({
  control,
}: {
  control: Control<z.infer<typeof newEquityPlanFormSchema>>;
}) => {
  return (
    <FormField
      control={control}
      name="initialPlanSize"
      render={({ field }) => (
        <FormItem>
          <FormLabel>Initial Plan Size (Shares)</FormLabel>
          <FormControl>
            <Input
              placeholder=""
              {...field}
              type="number"
              onChange={e => field.onChange(Number(e.target.value))}
            />
          </FormControl>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default InitialPlanSize;


================================================
FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/ShareClassSelect.tsx
================================================
import { Control } from "react-hook-form";
import * as z from "zod";

import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select";

import { newEquityPlanFormSchema } from "./index";

const ShareClassSelect = ({
  control,
}: {
  control: Control<z.infer<typeof newEquityPlanFormSchema>>;
}) => {
  return (
    <FormField
      control={control}
      name="shareClass"
      render={({ field }) => (
        <FormItem>
          <FormLabel>Share Class</FormLabel>
          <Select onValueChange={field.onChange} defaultValue={field.value}>
            <FormControl>
              <SelectTrigger>
                <SelectValue placeholder="" />
              </SelectTrigger>
            </FormControl>
            <SelectContent>
              <SelectItem value="Common">Common</SelectItem>
            </SelectContent>
          </Select>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default ShareClassSelect;


================================================
FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/TermsOfPlan.tsx
================================================
import { Control } from "react-hook-form";
import * as z from "zod";

import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";

import { newEquityPlanFormSchema } from "./index";

const TermsOfPlan = ({
  control,
}: {
  control: Control<z.infer<typeof newEquityPlanFormSchema>>;
}) => {
  return (
    <FormField
      control={control}
      name="termsOfYears"
      render={({ field }) => (
        <FormItem>
          <FormLabel>Term of Plan (years)</FormLabel>
          <FormControl>
            <Input
              placeholder=""
              {...field}
              type="number"
              onChange={e => field.onChange(Number(e.target.value))}
            />
          </FormControl>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default TermsOfPlan;


================================================
FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/index.tsx
================================================
"use client";

import { zodResolver } from "@hookform/resolvers/zod";
import { useRouter } from "next/navigation";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import * as z from "zod";

import { configuration } from "@/core/constants/configs";

import { Button } from "@/components/ui/button";
import {
  Form,
  FormControl,
  FormDescription,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";

import DateField from "./DateField";
import EquityRetired from "./EquityRetired";
import FieldWithType from "./FieldWithType";
import InitialPlanSize from "./InitialPlanSize";
import ShareClassSelect from "./ShareClassSelect";
import TermsOfPlan from "./TermsOfPlan";

export const newEquityPlanFormSchema = z.object({
  name: z.string().min(2).max(50),
  shareClass: z.string(),
  initialPlanSize: z.number().min(1).max(1000000000),
  termsOfYears: z.number().min(1).max(100),
  equityRetired: z.number().min(1).max(1000000000),
  boardApprovalDate: z.date(),
  stockholderApprovalDate: z.date(),
  purchasePeriod: z.number(),
  purchasePeriodType: z.enum(["days", "months", "years"]),
  comments: z.string(),
  documents: z.array(z.string()),

  // Post termination exercise period
  voluntaryTermination: z.number(),
  voluntaryTerminationType: z.enum(["days", "months", "years"]),

  involuntaryTermination: z.number(),
  involuntaryTerminationType: z.enum(["days", "months", "years"]),

  terminationWithCause: z.number(),
  terminationWithCauseType: z.enum(["days", "months", "years"]),

  death: z.number(),
  deathType: z.enum(["days", "months", "years"]),

  disability: z.number(),
  disabilityType: z.enum(["days", "months", "years"]),

  retirement: z.number(),
  retirementType: z.enum(["days", "months", "years"]),
});

const periodOptions = [
  { label: "Days", value: "days" },
  { label: "Months", value: "months" },
  { label: "Years", value: "years" },
];

const NewEquityPlanForm = () => {
  const router = useRouter();

  const form = useForm<z.infer<typeof newEquityPlanFormSchema>>({
    resolver: zodResolver(newEquityPlanFormSchema),
    defaultValues: {
      name: "",
      shareClass: "Common",
      initialPlanSize: 0,
      termsOfYears: 10,
      equityRetired: 0,
      boardApprovalDate: new Date(),
      stockholderApprovalDate: new Date(),
      purchasePeriod: 0,
      purchasePeriodType: "days",
      comments: "",
      documents: [],

      // Post termination exercise period
      voluntaryTermination: 0,
      voluntaryTerminationType: "days",

      involuntaryTermination: 0,
      involuntaryTerminationType: "days",

      terminationWithCause: 0,
      terminationWithCauseType: "days",

      death: 0,
      deathType: "days",

      disability: 0,
      disabilityType: "days",

      retirement: 0,
      retirementType: "days",
    },
  });

  function onSubmit(values: z.infer<typeof newEquityPlanFormSchema>) {
    toast.success("Share Class Created!");
    router.push(configuration.paths.equityPlans.all);
  }

  return (
    <Form {...form}>
      <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
        <FormField
          control={form.control}
          name="name"
          render={({ field }) => (
            <FormItem>
              <FormLabel>Equity Plan Name</FormLabel>
              <FormControl>
                <Input placeholder="" {...field} />
              </FormControl>
              <FormDescription>
                This is your public display name.
              </FormDescription>
              <FormMessage />
            </FormItem>
          )}
        />
        <ShareClassSelect control={form.control} />
        <InitialPlanSize control={form.control} />
        <TermsOfPlan control={form.control} />
        <EquityRetired control={form.control} />
        <DateField
          control={form.control}
          name="boardApprovalDate"
          label="Board Approval Date"
        />
        <DateField
          control={form.control}
          name="stockholderApprovalDate"
          label="Stockholder Approval Date"
        />
        <FieldWithType
          label="Repurchase Period"
          nameOfValue="purchasePeriod"
          nameOfValueType="purchasePeriodType"
          control={form.control}
          type="number"
          typeOptions={periodOptions}
        />
        <FormField
          control={form.control}
          name="comments"
          render={({ field }) => (
            <FormItem>
              <FormLabel>Comment</FormLabel>
              <FormControl>
                <Textarea className="resize-none" {...field} />
              </FormControl>
              <FormDescription>
                You can <span>@mention</span> other users and organizations.
              </FormDescription>
              <FormMessage />
            </FormItem>
          )}
        />
        <Button type="submit">Submit</Button>
      </form>
    </Form>
  );
};

export default NewEquityPlanForm;


================================================
FILE: apps/web/app/dashboard/equity-plans/new/page.tsx
================================================
import Container from "@/components/ui/Container";
import Tile from "@/components/ui/Tile";

import NewEquityPlanForm from "../components/NewEquityPlanForm";

export const metadata = {
  title: "Add Equity Plan",
};

const NewEquityPlanPage = async () => {
  return (
    <div className="h-full flex flex-col items-center gap-8">
      <Container className="max-w-3xl ml-0">
        <Tile>
          <h1 className="text-2xl font-bold">Add Equity Plan</h1>
          <NewEquityPlanForm />
        </Tile>
      </Container>
    </div>
  );
};

export default NewEquityPlanPage;


================================================
FILE: apps/web/app/dashboard/equity-plans/page.tsx
================================================
import { configuration } from "@/core/constants/configs";

import Container from "@/components/ui/Container";
import Tile from "@/components/ui/Tile";
import { Button } from "@/components/ui/button";

import EquityPlansTable from "./components/EquityPlansTable";

export const metadata = {
  title: "Equity Plans",
};

const EquityPlansPage = async () => {
  return (
    <div className="h-full flex flex-col items-center gap-8">
      <Container>
        <Tile>
          <div className="flex items-center justify-between w-full">
            <h1 className="text-2xl font-bold">Equity Plans</h1>
            <Button href={configuration.paths.equityPlans.new}>
              Add Equity Plan
            </Button>
          </div>
          <EquityPlansTable />
        </Tile>
      </Container>
    </div>
  );
};

export default EquityPlansPage;


================================================
FILE: apps/web/app/dashboard/layout.tsx
================================================
import { redirect } from "next/navigation";

import NavBar from "@/components/layout/NavBar";

import { getCurrentUser } from "@/lib/server/session";

export default async function DashboardLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const user = await getCurrentUser();
  if (!user) {
    redirect("/auth/signin");
  }

  return (
    <div>
      <NavBar user={user} />
      <main className="py-10">
        <div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">{children}</div>
      </main>
    </div>
  );
}


================================================
FILE: apps/web/app/dashboard/page.tsx
================================================
import { ArrowTopRightOnSquareIcon } from "@heroicons/react/20/solid";
import Link from "next/link";

import { configuration } from "@/core/constants/configs";

import Tile from "@/components/ui/Tile";

export const metadata = {
  title: "Dashboard",
};

const AboutPage = () => {
  return (
    <div className="max-w-2xl">
      <Tile>
        <h1 className="text-2xl font-bold mb-10">
          Welcome to your Open Source Cap Table Management!
        </h1>
        <Link
          className="flex justify-between items-center pb-3 border-b"
          href={configuration.paths.equityPlans.all}
        >
          Equity Plan(s)
          <ArrowTopRightOnSquareIcon className="h-5 w-5" />
        </Link>
        <Link
          className="flex justify-between items-center pb-3 border-b"
          href={configuration.paths.shareClasses.all}
        >
          Share Classes
          <ArrowTopRightOnSquareIcon className="h-5 w-5" />
        </Link>
        <Link
          className="flex justify-between items-center pb-3"
          href={configuration.paths.capTables.all}
        >
          Cap Table
          <ArrowTopRightOnSquareIcon className="h-5 w-5" />
        </Link>
      </Tile>
    </div>
  );
};

export default AboutPage;


================================================
FILE: apps/web/app/dashboard/rule-701/page.tsx
================================================
import WorkInProgress from "@/components/WorkInProgress";

export const metadata = {
  title: "Rule 701",
};

const Rule701Page = () => {
  return (
    <div>
      <WorkInProgress />
    </div>
  );
};

export default Rule701Page;


================================================
FILE: apps/web/app/dashboard/settings/page.tsx
================================================
import WorkInProgress from "@/components/WorkInProgress";

export const metadata = {
  title: "Settings",
};

const SettingsPage = () => {
  return (
    <div>
      <WorkInProgress />
    </div>
  );
};

export default SettingsPage;


================================================
FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/AdvancedSettings.tsx
================================================
import { Fragment } from "react";
import { UseFormReturn } from "react-hook-form";
import * as z from "zod";

import Tile from "@/components/ui/Tile";
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Switch } from "@/components/ui/switch";
import { Textarea } from "@/components/ui/textarea";

import TextField from "./TextField";
import { newShareClassFormSchema } from "./index";

const AdvancedSettings = ({
  form,
}: {
  form: UseFormReturn<z.infer<typeof newShareClassFormSchema>>;
}) => {
  const watchHasVotingRights = form.watch("hasVotingRights");

  return (
    <Tile>
      <h3 className="text-lg font-semibold">3. Voting Rights</h3>
      <p className="text-xs text-zinc-600">
        Certificates and Advanced Settings are coming soon...
      </p>

      <FormField
        control={form.control}
        name="hasVotingRights"
        render={({ field }) => (
          <FormItem className="flex flex-col">
            <FormLabel className="mt-4">Enable Voting Rights</FormLabel>
            <FormControl>
              <Switch checked={field.value} onCheckedChange={field.onChange} />
            </FormControl>
          </FormItem>
        )}
      />
      {watchHasVotingRights ? (
        <Fragment>
          <TextField
            control={form.control}
            label="Voting Multiplier"
            name="votingMultiplier"
            type="number"
          />
          <FormField
            control={form.control}
            name="votingComment"
            render={({ field }) => (
              <FormItem>
                <FormLabel>Comment</FormLabel>
                <FormControl>
                  <Textarea className="resize-none" {...field} />
                </FormControl>
                <FormMessage />
              </FormItem>
            )}
          />
        </Fragment>
      ) : null}
    </Tile>
  );
};

export default AdvancedSettings;


================================================
FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/ClassType.tsx
================================================
import { Control } from "react-hook-form";
import * as z from "zod";

import Tile from "@/components/ui/Tile";
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
} from "@/components/ui/form";
import { Switch } from "@/components/ui/switch";

import { newShareClassFormSchema } from ".";
import RadioGroupField from "./RadioGroupField";

const ClassType = ({
  control,
}: {
  control: Control<z.infer<typeof newShareClassFormSchema>>;
}) => {
  return (
    <Tile>
      <h3 className="text-lg font-semibold">1. Select Class Type</h3>
      <RadioGroupField
        control={control}
        label="Share Class Type"
        name="classType"
        options={[
          {
            value: "Common",
            label: "Common",
          },
          {
            value: "Preferred",
            label: "Preferred",
          },
        ]}
      />

      <FormField
        control={control}
        name="excludeFromDilution"
        render={({ field }) => (
          <FormItem className="flex flex-col">
            <FormLabel className="mt-4">Exclude from Fully Diluted</FormLabel>
            <FormControl>
              <Switch checked={field.value} onCheckedChange={field.onChange} />
            </FormControl>
          </FormItem>
        )}
      />
    </Tile>
  );
};

export default ClassType;


================================================
FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/DateField.tsx
================================================
import { CalendarIcon } from "@radix-ui/react-icons";
import { format } from "date-fns";
import { Control } from "react-hook-form";
import * as z from "zod";

import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/components/ui/popover";

import { cn } from "@/lib/utils/common";

import { newShareClassFormSchema } from ".";

const DateField = ({
  control,
  name,
  label,
  placeholder = "MM/DD/YYYY",
}: {
  label: string;
  placeholder?: string;
  name: keyof z.infer<typeof newShareClassFormSchema>;
  control: Control<z.infer<typeof newShareClassFormSchema>>;
}) => {
  return (
    <FormField
      control={control}
      name={name}
      render={({ field }) => (
        <FormItem className="flex flex-col">
          <FormLabel>{label}</FormLabel>
          <Popover>
            <PopoverTrigger asChild>
              <FormControl>
                <Button
                  variant={"outline"}
                  className={cn(
                    "pl-3 text-left font-normal",
                    !field.value && "text-muted-foreground",
                  )}
                >
                  {field.value ? (
                    format(field.value as number, "MM/dd/yyyy")
                  ) : (
                    <span>{placeholder}</span>
                  )}
                  <CalendarIcon className="ml-auto h-4 w-4 opacity-50" />
                </Button>
              </FormControl>
            </PopoverTrigger>
            <PopoverContent className="w-auto p-0" align="start">
              <Calendar
                mode="single"
                selected={field.value as Date}
                onSelect={field.onChange}
                disabled={date =>
                  date > new Date() || date < new Date("1900-01-01")
                }
                initialFocus
              />
            </PopoverContent>
          </Popover>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default DateField;


================================================
FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/Information.tsx
================================================
import { Control } from "react-hook-form";
import * as z from "zod";

import Tile from "@/components/ui/Tile";

import DateField from "./DateField";
import RadioGroupField from "./RadioGroupField";
import TextField from "./TextField";
import { newShareClassFormSchema } from "./index";

const Information = ({
  control,
}: {
  control: Control<z.infer<typeof newShareClassFormSchema>>;
}) => {
  return (
    <Tile>
      <h3 className="text-lg font-semibold">2. Share Class Information</h3>

      <TextField control={control} name="name" label="Share Class Name" />
      <TextField control={control} name="prefix" label="Share Class Prefix" />
      <TextField
        control={control}
        name="authorizedShares"
        label="Authorized Number of Shares"
        type="number"
      />
      <TextField
        control={control}
        name="pricePerShare"
        label="Price per Share ($)"
        type="number"
      />
      <TextField
        control={control}
        name="parValue"
        label="Par Value ($)"
        type="number"
      />
      <DateField
        control={control}
        label="Stockholder Approval Date"
        name="stockholderApprovalDate"
      />
      <DateField
        control={control}
        label="Board Approval Date"
        name="boardApprovalDate"
      />
      <RadioGroupField
        control={control}
        label="Dividends"
        name="dividends"
        options={[
          {
            value: "Cumulative",
            label: "Cumulative",
          },
          {
            value: "Non-Cumulative",
            label: "Non-Cumulative",
          },
        ]}
      />
    </Tile>
  );
};

export default Information;


================================================
FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/RadioGroupField.tsx
================================================
import { Control } from "react-hook-form";
import * as z from "zod";

import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";

import { newShareClassFormSchema } from "./index";

type Props = {
  label: string;
  name: keyof z.infer<typeof newShareClassFormSchema>;
  control: Control<z.infer<typeof newShareClassFormSchema>>;
  options: Array<{
    label: string;
    value: string;
  }>;
};

const RadioGroupField = ({ control, label, name, options }: Props) => {
  return (
    <FormField
      control={control}
      name={name}
      render={({ field }) => (
        <FormItem className="space-y-3">
          <FormLabel>{label}</FormLabel>
          <FormControl>
            <RadioGroup
              onValueChange={field.onChange}
              defaultValue={field.value as string}
              className="flex gap-6"
            >
              {options.map(option => (
                <FormItem
                  className="flex items-center space-x-3 space-y-0"
                  key={option.value}
                >
                  <FormControl>
                    <RadioGroupItem value={option.value} />
                  </FormControl>
                  <FormLabel className="font-normal">{option.label}</FormLabel>
                </FormItem>
              ))}
            </RadioGroup>
          </FormControl>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default RadioGroupField;


================================================
FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/TextField.tsx
================================================
import { HTMLInputTypeAttribute } from "react";
import { Control } from "react-hook-form";
import * as z from "zod";

import {
  FormControl,
  FormField,
  FormItem,
  FormLabel,
  FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";

import { newShareClassFormSchema } from "./index";

const TextField = ({
  control,
  name,
  label,
  placeholder = "",
  type = "text",
}: {
  label: string;
  type?: HTMLInputTypeAttribute;
  placeholder?: string;
  name: keyof z.infer<typeof newShareClassFormSchema>;
  control: Control<z.infer<typeof newShareClassFormSchema>>;
}) => {
  return (
    <FormField
      control={control}
      name={name}
      render={({ field }) => (
        <FormItem>
          <FormLabel>{label}</FormLabel>
          <FormControl>
            <Input
              placeholder={placeholder}
              {...field}
              type={type}
              value={field.value as string}
              onChange={e => {
                const isNumber = type === "number";
                const value = isNumber
                  ? Number(e.target.value)
                  : e.target.value;
                field.onChange(value);
              }}
            />
          </FormControl>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default TextField;


================================================
FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/index.tsx
================================================
"use client";

import { zodResolver } from "@hookform/resolvers/zod";
import { useRouter } from "next/navigation";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import * as z from "zod";

import { configuration } from "@/core/constants/configs";

import { Button } from "@/components/ui/button";
import { Form } from "@/components/ui/form";

import AdvancedSettings from "./AdvancedSettings";
import ClassType from "./ClassType";
import Information from "./Information";

export const newShareClassFormSchema = z.object({
  // Class Type
  classType: z.enum(["Common", "Preferred"]),
  excludeFromDilution: z.boolean(),
  documents: z.array(z.string()),

  // Share Class Information
  name: z.string().min(1),
  prefix: z.string(),
  authorizedShares: z.number(),
  pricePerShare: z.number(),
  parValue: z.number(),
  stockholderApprovalDate: z.date(),
  boardApprovalDate: z.date(),
  dividends: z.enum(["Cumulative", "Non-Cumulative"]),

  // Voting Rights, [Future => Certificate and Advanced Settings]
  hasVotingRights: z.boolean(),
  votingMultiplier: z.number().min(1),
  votingComment: z.string(),
});

const NewEquityPlanForm = () => {
  const router = useRouter();

  const form = useForm<z.infer<typeof newShareClassFormSchema>>({
    resolver: zodResolver(newShareClassFormSchema),
    defaultValues: {
      classType: "Common",
      excludeFromDilution: false,
      documents: [],

      // Share Class Information
      name: "",
      prefix: "",
      authorizedShares: 0,
      pricePerShare: 0,
      parValue: 0,
      stockholderApprovalDate: new Date(),
      boardApprovalDate: new Date(),
      dividends: "Cumulative",

      // Voting Rights, [Future => Certificate and Advanced Settings]
      hasVotingRights: false,
      votingMultiplier: 1,
      votingComment: "",
    },
  });

  function onSubmit(values: z.infer<typeof newShareClassFormSchema>) {
    toast.success("Share Class Created!");
    router.push(configuration.paths.shareClasses.all);
  }

  return (
    <Form {...form}>
      <form onSubmit={form.handleSubmit(onSubmit)} className="mt-5 space-y-8">
        <ClassType control={form.control} />
        <Information control={form.control} />
        <AdvancedSettings form={form} />
        <div className="flex justify-end">
          <Button type="submit" className="max-w-xs w-full">
            Submit
          </Button>
        </div>
      </form>
    </Form>
  );
};

export default NewEquityPlanForm;


================================================
FILE: apps/web/app/dashboard/share-classes/components/ShareClassesTable.tsx
================================================
import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table";

type ShareClass = {
  id: string;
  name: string;
  shareClass: string;
  perValue: number;
  pricePerShare: number | null;
  authorizedShares: number;
};

const mockShareClasses: ShareClass[] = [
  {
    id: "1",
    name: "EQ1",
    shareClass: "Common",
    perValue: 0,
    pricePerShare: null,
    authorizedShares: 1000000,
  },
];

const ShareClassesTable = () => {
  return (
    <Table>
      <TableHeader>
        <TableRow>
          <TableHead className="w-[100px]">Name</TableHead>
          <TableHead>Share Class</TableHead>
          <TableHead>Per Value</TableHead>
          <TableHead className="text-right">Price Per Share</TableHead>
          <TableHead className="text-right">Authorized Shares</TableHead>
        </TableRow>
      </TableHeader>
      <TableBody>
        {mockShareClasses.map(plan => (
          <TableRow key={plan.id}>
            <TableCell className="font-medium">{plan.name}</TableCell>
            <TableCell>{plan.shareClass}</TableCell>
            <TableCell>{plan.perValue}</TableCell>
            <TableCell className="text-right">
              {plan.pricePerShare || "--"}
            </TableCell>
            <TableCell className="text-right">
              <p className="text-sm">{plan.authorizedShares}</p>
              <p className="text-xs">{plan.authorizedShares} outstanding</p>
            </TableCell>
          </TableRow>
        ))}
      </TableBody>
    </Table>
  );
};

export default ShareClassesTable;


================================================
FILE: apps/web/app/dashboard/share-classes/new/page.tsx
================================================
import Container from "@/components/ui/Container";
import Tile from "@/components/ui/Tile";

import NewShareClassForm from "../components/NewShareClassForm";

export const metadata = {
  title: "Add Share Class",
};

const NewShareClassPage = async () => {
  return (
    <div className="h-full flex flex-col items-center gap-8">
      <Container className="max-w-3xl ml-0">
        <Tile>
          <h1 className="text-2xl font-bold">Add Share Class</h1>
          <p className="text-xs text-zinc-600">
            Keep track of shares that were issued outside of this platform.
          </p>
        </Tile>
        <NewShareClassForm />
      </Container>
    </div>
  );
};

export default NewShareClassPage;


================================================
FILE: apps/web/app/dashboard/share-classes/page.tsx
================================================
import { configuration } from "@/core/constants/configs";

import Container from "@/components/ui/Container";
import Tile from "@/components/ui/Tile";
import { Button } from "@/components/ui/button";

import ShareClassesTable from "./components/ShareClassesTable";

export const metadata = {
  title: "Share Classes",
};

const ShareClassesPage = async () => {
  return (
    <div className="h-full flex flex-col items-center gap-8">
      <Container>
        <Tile>
          <div className="flex items-center justify-between w-full">
            <h1 className="text-2xl font-bold">Share Classes</h1>
            <Button href={configuration.paths.shareClasses.new}>
              Add a Share Classes
            </Button>
          </div>
          <ShareClassesTable />
        </Tile>
      </Container>
    </div>
  );
};

export default ShareClassesPage;


================================================
FILE: apps/web/app/globals.css
================================================
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;

    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;

    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;

    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;

    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;

    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;

    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 10% 3.9%;

    --radius: 0.5rem;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
  }
}

================================================
FILE: apps/web/app/layout.tsx
================================================
import { Analytics } from "@vercel/analytics/react";
import { Inter } from "next/font/google";
import { Toaster } from "sonner";

import CapTableBanner from "@/components/CapTableBanner";

import { cn } from "@/lib/utils/common";

import "./globals.css";

const inter = Inter({
  subsets: ["latin"],
  variable: "--font-inter",
  display: "swap",
});

export const metadata = {
  title: "ByeByeCarta.com",
  description: "Open Source Cap Table Manager",
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body
        className={cn(
          "min-h-screen bg-background font-sans antialiased text-gray-900 tracking-tight",
          inter.variable,
        )}
      >
        <CapTableBanner />
        <Toaster richColors />
        <div className="flex flex-col min-h-screen overflow-hidden supports-[overflow:clip]:overflow-clip">
          {children}
          <Analytics />
        </div>
      </body>
    </html>
  );
}


================================================
FILE: apps/web/app/not-found.tsx
================================================
import Link from "next/link";

export default function NotFound() {
  return (
    <section className="relative">
      {/* Illustration behind content */}
      <div
        className="absolute left-1/2 transform -translate-x-1/2 -mb-64 bottom-0 pointer-events-none -z-1"
        aria-hidden="true"
      >
        <svg
          width="1360"
          height="578"
          viewBox="0 0 1360 578"
          xmlns="http://www.w3.org/2000/svg"
        >
          <defs>
            <linearGradient
              x1="50%"
              y1="0%"
              x2="50%"
              y2="100%"
              id="illustration-01"
            >
              <stop stopColor="#FFF" offset="0%" />
              <stop stopColor="#EAEAEA" offset="77.402%" />
              <stop stopColor="#DFDFDF" offset="100%" />
            </linearGradient>
          </defs>
          <g fill="url(#illustration-01)" fillRule="evenodd">
            <circle cx="1232" cy="128" r="128" />
            <circle cx="155" cy="443" r="64" />
          </g>
        </svg>
      </div>

      <div className="max-w-6xl mx-auto px-4 sm:px-6">
        <div className="pt-32 pb-12 md:pt-40 md:pb-20">
          <div className="max-w-3xl mx-auto text-center">
            {/* 404 content */}
            <h1 className="h1 mb-4">Oh, No! You stumbled upon a rarity</h1>
            <div className="mt-8">
              <Link
                href="/"
                className="btn text-white bg-blue-600 hover:bg-blue-700"
              >
                Go back home
              </Link>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}


================================================
FILE: apps/web/components/CapTableBanner.tsx
================================================
export default function CapTableBanner() {
  return (
    <div className="w-full flex items-center justify-center bg-gray-900 px-6 py-2.5 sm:px-3.5">
      <p className="text-sm leading-6 text-white w-full text-center">
        For cloud <span role="image">☁️</span> hosted solution to this Cap Table
        Management,{" "}
        <a href="https://jl1zzmzlaee.typeform.com/to/Fbf4XlNu" target="_blank">
          <strong className="font-semibold underline">register here</strong>
        </a>{" "}
        <span role="image">👉</span>.
      </p>
    </div>
  );
}


================================================
FILE: apps/web/components/Logo/Logo.tsx
================================================
import Link from "next/link";
import React from "react";

import LogoImage from "./LogoImage";

const Logo: React.FCC<{ href?: string; className?: string }> = ({
  href,
  className,
}) => {
  return (
    <Link href={href ?? "/"}>
      <LogoImage className={className} />
    </Link>
  );
};

export default Logo;


================================================
FILE: apps/web/components/Logo/LogoImage.tsx
================================================
import { cn } from "@/lib/utils/common";

const LogoImage: React.FCC<{
  className?: string;
}> = ({ className }) => {
  return (
    <svg
      className={cn("w-8 h-8", className)}
      viewBox="0 0 32 32"
      xmlns="http://www.w3.org/2000/svg"
    >
      <defs>
        <radialGradient
          cx="21.152%"
          cy="86.063%"
          fx="21.152%"
          fy="86.063%"
          r="79.941%"
          id="footer-logo"
        >
          <stop stopColor="zinc-300" offset="0%" />
          <stop stopColor="zinc-400" offset="15.871%" />
          <stop stopColor="slate-300" offset="100%" />
        </radialGradient>
      </defs>
      <rect
        width="32"
        height="32"
        rx="16"
        fill="url(#footer-logo)"
        fillRule="nonzero"
      />
    </svg>
  );
};

export default LogoImage;


================================================
FILE: apps/web/components/Logo/index.ts
================================================
export { default } from "./Logo";


================================================
FILE: apps/web/components/WorkInProgress.tsx
================================================
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

import { faBarsProgress } from "@fortawesome/free-solid-svg-icons";

import Container from "./ui/Container";
import { Alert, AlertDescription, AlertTitle } from "./ui/alert";

const WorkInProgress = () => {
  return (
    <Container className="flex flex-col items-center justify-center h-[70vh] max-w-2xl">
      <Alert className="border-amber-400 bg-amber-50">
        <FontAwesomeIcon
          className="h-4 w-4 !text-amber-600"
          icon={faBarsProgress}
        />
        <AlertTitle className="text-amber-600">Work in progress!</AlertTitle>
        <AlertDescription className="text-amber-600">
          This page is still under construction. Please check back later.
        </AlertDescription>
      </Alert>
    </Container>
  );
};

export default WorkInProgress;


================================================
FILE: apps/web/components/layout/NavBar/index.tsx
================================================
"use client";

import { Dialog, Menu, Transition } from "@headlessui/react";
import { ChevronDownIcon } from "@heroicons/react/20/solid";
import {
  Bars3Icon,
  BellIcon,
  ChartPieIcon,
  Cog6ToothIcon,
  DocumentDuplicateIcon,
  HomeIcon,
  UsersIcon,
  XMarkIcon,
} from "@heroicons/react/24/outline";
import { Session } from "next-auth";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { Fragment, useState } from "react";

import { configuration } from "@/core/constants/configs";

import { cn } from "@/lib/utils/common";

const navigation = [
  {
    name: "Dashboard",
    href: configuration.paths.dashbord,
    icon: HomeIcon,
  },
  {
    name: "Cap Table",
    href: configuration.paths.capTables.all,
    icon: UsersIcon,
  },
  {
    name: "Share Class",
    href: configuration.paths.shareClasses.all,
    icon: DocumentDuplicateIcon,
  },

  {
    name: "Equity Plan",
    href: configuration.paths.equityPlans.all,
    icon: ChartPieIcon,
  },
];
const compliances = [
  {
    id: 1,
    name: "409A",
    href: configuration.paths.valuation401A,
    initial: "4",
    current: false,
  },
];
const forms = [
  {
    id: 1,
    name: "Rule 701",
    href: configuration.paths.rule701,
    initial: "R",
    current: false,
  },
];
const userNavigation = [
  { name: "Profile", href: "/dashboard/profile" },
  { name: "Sign out", href: "/auth/signout" },
];

export default function NavBar({ user }: { user: Session["user"] | null }) {
  const pathname = usePathname();
  const [sidebarOpen, setSidebarOpen] = useState(false);

  return (
    <>
      <Transition.Root show={sidebarOpen} as={Fragment}>
        <Dialog
          as="div"
          className="relative z-50 lg:hidden"
          onClose={setSidebarOpen}
        >
          <Transition.Child
            as={Fragment}
            enter="transition-opacity ease-linear duration-300"
            enterFrom="opacity-0"
            enterTo="opacity-100"
            leave="transition-opacity ease-linear duration-300"
            leaveFrom="opacity-100"
            leaveTo="opacity-0"
          >
            <div className="fixed inset-0 bg-gray-900/80" />
          </Transition.Child>

          <div className="fixed inset-0 flex">
            <Transition.Child
              as={Fragment}
              enter="transition ease-in-out duration-300 transform"
              enterFrom="-translate-x-full"
              enterTo="translate-x-0"
              leave="transition ease-in-out duration-300 transform"
              leaveFrom="translate-x-0"
              leaveTo="-translate-x-full"
            >
              <Dialog.Panel className="relative mr-16 flex w-full max-w-xs flex-1">
                <Transition.Child
                  as={Fragment}
                  enter="ease-in-out duration-300"
                  enterFrom="opacity-0"
                  enterTo="opacity-100"
                  leave="ease-in-out duration-300"
                  leaveFrom="opacity-100"
                  leaveTo="opacity-0"
                >
                  <div className="absolute left-full top-0 flex w-16 justify-center pt-5">
                    <button
                      type="button"
                      className="-m-2.5 p-2.5"
                      onClick={() => setSidebarOpen(false)}
                    >
                      <span className="sr-only">Close sidebar</span>
                      <XMarkIcon
                        className="h-6 w-6 text-white"
                        aria-hidden="true"
                      />
                    </button>
                  </div>
                </Transition.Child>
                {/* Sidebar component, swap this element with another sidebar if you like */}
                <div className="flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 pb-4">
                  <div className="flex h-16 shrink-0 items-center">
                    cap.octolane.com
                  </div>
                  <nav className="flex flex-1 flex-col">
                    <ul role="list" className="flex flex-1 flex-col gap-y-7">
                      <li>
                        <ul role="list" className="-mx-2 space-y-1">
                          {navigation.map(item => {
                            const isCurrent = pathname.startsWith(item.href);

                            return (
                              <li key={item.name}>
                                <Link
                                  href={item.href}
                                  className={cn(
                                    isCurrent
                                      ? "bg-gray-50 text-zinc-600"
                                      : "text-gray-700 hover:text-zinc-600 hover:bg-gray-50",
                                    "group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold",
                                  )}
                                >
                                  <item.icon
                                    className={cn(
                                      isCurrent
                                        ? "text-zinc-600"
                                        : "text-gray-400 group-hover:text-zinc-600",
                                      "h-6 w-6 shrink-0",
                                    )}
                                    aria-hidden="true"
                                  />
                                  {item.name}
                                </Link>
                              </li>
                            );
                          })}
                        </ul>
                      </li>
                      <li>
                        <div className="text-xs font-semibold leading-6 text-gray-400">
                          Comply & Tax
                        </div>
                        <ul role="list" className="-mx-2 mt-2 space-y-1">
                          {compliances.map(comply => {
                            const isCurrent = pathname.startsWith(comply.href);
                            return (
                              <li key={comply.name}>
                                <Link
                                  href={comply.href}
                                  className={cn(
                                    isCurrent
                                      ? "bg-gray-50 text-zinc-600"
                                      : "text-gray-700 hover:text-zinc-600 hover:bg-gray-50",
                                    "group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold",
                                  )}
                                >
                                  <span
                                    className={cn(
                                      isCurrent
                                        ? "text-zinc-600 border-zinc-600"
                                        : "text-gray-400 border-gray-200 group-hover:border-zinc-600 group-hover:text-zinc-600",
                                      "flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white",
                                    )}
                                  >
                                    {comply.initial}
                                  </span>
                                  <span className="truncate">
                                    {comply.name}
                                  </span>
                                </Link>
                              </li>
                            );
                          })}
                        </ul>
                      </li>
                      <li className="mt-auto">
                        <Link
                          href={configuration.paths.settings}
                          className="group -mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6 text-gray-700 hover:bg-gray-50 hover:text-zinc-600"
                        >
                          <Cog6ToothIcon
                            className="h-6 w-6 shrink-0 text-gray-400 group-hover:text-zinc-600"
                            aria-hidden="true"
                          />
                          Settings
                        </Link>
                      </li>
                    </ul>
                  </nav>
                </div>
              </Dialog.Panel>
            </Transition.Child>
          </div>
        </Dialog>
      </Transition.Root>

      {/* Static sidebar for desktop */}
      <div className="hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col">
        {/* Sidebar component, swap this element with another sidebar if you like */}
        <div className="flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 pb-4">
          <div className="flex h-16 shrink-0 items-center">
            cap.octolane.com
          </div>
          <nav className="flex flex-1 flex-col">
            <ul role="list" className="flex flex-1 flex-col gap-y-7">
              <li>
                <ul role="list" className="-mx-2 space-y-1">
                  {navigation.map(item => {
                    const isCurrent = pathname.startsWith(item.href);
                    return (
                      <li key={item.name}>
                        <Link
                          href={item.href}
                          className={cn(
                            isCurrent
                              ? "bg-gray-50 text-zinc-600"
                              : "text-gray-700 hover:text-zinc-600 hover:bg-gray-50",
                            "group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold",
                          )}
                        >
                          <item.icon
                            className={cn(
                              isCurrent
                                ? "text-zinc-600"
                                : "text-gray-400 group-hover:text-zinc-600",
                              "h-6 w-6 shrink-0",
                            )}
                            aria-hidden="true"
                          />
                          {item.name}
                        </Link>
                      </li>
                    );
                  })}
                </ul>
              </li>
              <li>
                <div className="text-xs font-semibold leading-6 text-gray-400">
                  Valuations
                </div>
                <ul role="list" className="-mx-2 mt-2 space-y-1">
                  {compliances.map(team => {
                    const isCurrent = pathname.startsWith(team.href);

                    return (
                      <li key={team.name}>
                        <Link
                          href={team.href}
                          className={cn(
                            isCurrent
                              ? "bg-gray-50 text-zinc-600"
                              : "text-gray-700 hover:text-zinc-600 hover:bg-gray-50",
                            "group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold",
                          )}
                        >
                          <span
                            className={cn(
                              isCurrent
                                ? "text-zinc-600 border-zinc-600"
                                : "text-gray-400 border-gray-200 group-hover:border-zinc-600 group-hover:text-zinc-600",
                              "flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white",
                            )}
                          >
                            {team.initial}
                          </span>
                          <span className="truncate">{team.name}</span>
                        </Link>
                      </li>
                    );
                  })}
                </ul>
              </li>
              <li>
                <div className="text-xs font-semibold leading-6 text-gray-400">
                  IRS & SEC Forms
                </div>
                <ul role="list" className="-mx-2 mt-2 space-y-1">
                  {forms.map(form => {
                    const isCurrent = pathname.startsWith(form.href);
                    return (
                      <li key={form.name}>
                        <Link
                          href={form.href}
                          className={cn(
                            isCurrent
                              ? "bg-gray-50 text-zinc-600"
                              : "text-gray-700 hover:text-zinc-600 hover:bg-gray-50",
                            "group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold",
                          )}
                        >
                          <span
                            className={cn(
                              isCurrent
                                ? "text-zinc-600 border-zinc-600"
                                : "text-gray-400 border-gray-200 group-hover:border-zinc-600 group-hover:text-zinc-600",
                              "flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white",
                            )}
                          >
                            {form.initial}
                          </span>
                          <span className="truncate">{form.name}</span>
                        </Link>
                      </li>
                    );
                  })}
                </ul>
              </li>
              <li className="mt-auto">
                <Link
                  href={configuration.paths.settings}
                  className="group -mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6 text-gray-700 hover:bg-gray-50 hover:text-zinc-600"
                >
                  <Cog6ToothIcon
                    className="h-6 w-6 shrink-0 text-gray-400 group-hover:text-zinc-600"
                    aria-hidden="true"
                  />
                  Settings
                </Link>
              </li>
            </ul>
          </nav>
        </div>
      </div>

      <div className="lg:pl-72">
        <div className="sticky top-0 z-40 lg:mx-auto lg:max-w-7xl lg:px-8">
          <div className="flex h-16 items-center gap-x-4 border-b border-gray-200 bg-white px-4 shadow-sm sm:gap-x-6 sm:px-6 lg:px-0 lg:shadow-none">
            <button
              type="button"
              className="-m-2.5 p-2.5 text-gray-700 lg:hidden"
              onClick={() => setSidebarOpen(true)}
            >
              <span className="sr-only">Open sidebar</span>
              <Bars3Icon className="h-6 w-6" aria-hidden="true" />
            </button>

            {/* Separator */}
            <div
              className="h-6 w-px bg-gray-200 lg:hidden"
              aria-hidden="true"
            />

            <div className="flex flex-1 gap-x-4 self-stretch lg:gap-x-6">
              <form
                className="relative flex flex-1"
                action="#"
                method="GET"
              ></form>
              <div className="flex items-center gap-x-4 lg:gap-x-6">
                <button
                  type="button"
                  className="-m-2.5 p-2.5 text-gray-400 hover:text-gray-500"
                >
                  <span className="sr-only">View notifications</span>
                  <BellIcon className="h-6 w-6" aria-hidden="true" />
                </button>

                {/* Separator */}
                <div
                  className="hidden lg:block lg:h-6 lg:w-px lg:bg-gray-200"
                  aria-hidden="true"
                />

                {/* Profile dropdown */}
                <Menu as="div" className="relative">
                  <Menu.Button className="-m-1.5 flex items-center p-1.5">
                    <span className="sr-only">Open user menu</span>
                    <img
                      className="h-8 w-8 rounded-full bg-gray-50"
                      src={
                        user?.image ||
                        `https://ui-avatars.com/api/?name=${user?.name}`
                      }
                      alt=""
                    />
                    <span className="hidden lg:flex lg:items-center">
                      <span
                        className="ml-4 text-sm font-semibold leading-6 text-gray-900"
                        aria-hidden="true"
                      >
                        {user?.name}
                      </span>
                      <ChevronDownIcon
                        className="ml-2 h-5 w-5 text-gray-400"
                        aria-hidden="true"
                      />
                    </span>
                  </Menu.Button>
                  <Transition
                    as={Fragment}
                    enter="transition ease-out duration-100"
                    enterFrom="transform opacity-0 scale-95"
                    enterTo="transform opacity-100 scale-100"
                    leave="transition ease-in duration-75"
                    leaveFrom="transform opacity-100 scale-100"
                    leaveTo="transform opacity-0 scale-95"
                  >
                    <Menu.Items className="absolute right-0 z-10 mt-2.5 w-32 origin-top-right rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none">
                      {userNavigation.map(item => (
                        <Menu.Item key={item.name}>
                          {({ active }) => (
                            <Link
                              href={item.href}
                              className={cn(
                                active ? "bg-gray-50" : "",
                                "block px-3 py-1 text-sm leading-6 text-gray-900",
                              )}
                            >
                              {item.name}
                            </Link>
                          )}
                        </Menu.Item>
                      ))}
                    </Menu.Items>
                  </Transition>
                </Menu>
              </div>
            </div>
          </div>
        </div>
      </div>
    </>
  );
}


================================================
FILE: apps/web/components/ui/Container.tsx
================================================
import { cn } from "@/lib/utils/common";

const Container: React.FCC<{ className?: string }> = ({
  children,
  className,
}) => {
  return (
    <div className={cn("container mx-auto px-5", className)}>{children}</div>
  );
};

export default Container;


================================================
FILE: apps/web/components/ui/Heading.tsx
================================================
import classNames from "clsx";

type HeadingType = 1 | 2 | 3 | 4 | 5 | 6;

const Heading: React.FCC<{ type?: HeadingType; className?: string }> = ({
  type,
  children,
  className,
}) => {
  switch (type) {
    case 1:
      return (
        <h1
          className={classNames(
            `font-heading scroll-m-20 text-4xl font-bold tracking-tight dark:text-white`,
            className,
          )}
        >
          {children}
        </h1>
      );
    case 2:
      return (
        <h2
          className={classNames(
            `font-heading scroll-m-20 pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0`,
            className,
          )}
        >
          {children}
        </h2>
      );
    case 3:
      return (
        <h3
          className={classNames(
            "font-heading scroll-m-20" +
              " text-2xl font-semibold tracking-tight",
            className,
          )}
        >
          {children}
        </h3>
      );
    case 4:
      return (
        <h4
          className={classNames(
            "font-heading scroll-m-20 text-xl font-semibold tracking-tight",
            className,
          )}
        >
          {children}
        </h4>
      );
    case 5:
      return (
        <h5
          className={classNames(
            "scroll-m-20 font-heading text-lg font-medium",
            className,
          )}
        >
          {children}
        </h5>
      );
    case 6:
      return (
        <h6
          className={classNames(
            "scroll-m-20 font-heading text-base" + " font-medium",
            className,
          )}
        >
          {children}
        </h6>
      );

    default:
      return <Heading type={1}>{children}</Heading>;
  }
};

export default Heading;


================================================
FILE: apps/web/components/ui/If.tsx
================================================
import { Fragment, useMemo } from "react";

type Condition<Value = unknown> = Value | Falsy;

function If<Value = unknown>({
  condition,
  children,
  fallback,
}: React.PropsWithoutRef<{
  condition: Condition<Value>;
  children: React.ReactNode | ((value: Value) => React.ReactNode);
  fallback?: React.ReactNode;
}>) {
  return useMemo(() => {
    if (condition) {
      if (typeof children === "function") {
        return <Fragment>{children(condition)}</Fragment>;
      }

      return <Fragment>{children}</Fragment>;
    }

    if (fallback) {
      return <Fragment>{fallback}</Fragment>;
    }

    return null;
  }, [condition, fallback, children]);
}

export default If;


================================================
FILE: apps/web/components/ui/Spinner.tsx
================================================
import classNames from "clsx";

function Spinner(
  props: React.PropsWithChildren<{
    className?: string;
  }>,
) {
  return (
    <div role="status">
      <svg
        aria-hidden="true"
        className={classNames(
          `h-8 w-8 animate-spin fill-white duration-200 dark:fill-primary text-primary dark:text-primary/30`,
          props.className,
        )}
        viewBox="0 0 100 101"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
          fill="currentColor"
        />

        <path
          d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
          fill="currentFill"
        />
      </svg>
    </div>
  );
}

export default Spinner;


================================================
FILE: apps/web/components/ui/Tile.tsx
================================================
import {
  ArrowSmallDownIcon,
  ArrowSmallUpIcon,
  Bars2Icon,
} from "@heroicons/react/24/outline";
import { useMemo } from "react";

import { cn } from "@/lib/utils/common";

import Heading from "./Heading";

const Tile: React.FCC<{ className?: string }> & {
  Header: typeof TileHeader;
  Heading: typeof TileHeading;
  Body: typeof TileBody;
  Figure: typeof TileFigure;
  Trend: typeof TileTrend;
  Badge: typeof TileBadge;
} = ({ children, className }) => {
  return (
    <div
      className={cn(
        "flex flex-col space-y-3 rounded-lg border border-gray-100" +
          " dark:border-dark-900 bg-background p-5",
        className,
      )}
    >
      {children}
    </div>
  );
};

function TileHeader(props: React.PropsWithChildren) {
  return <div className={"flex"}>{props.children}</div>;
}

function TileHeading(props: React.PropsWithChildren) {
  return (
    <Heading type={6}>
      <span className={"font-normal text-gray-500 dark:text-gray-400"}>
        {props.children}
      </span>
    </Heading>
  );
}

function TileBody(props: React.PropsWithChildren) {
  return <div className={"flex flex-col space-y-5"}>{props.children}</div>;
}

function TileFigure(props: React.PropsWithChildren) {
  return <div className={"text-3xl font-bold"}>{props.children}</div>;
}

function TileTrend(
  props: React.PropsWithChildren<{
    trend: "up" | "down" | "stale";
  }>,
) {
  const Icon = useMemo(() => {
    switch (props.trend) {
      case "up":
        return <ArrowSmallUpIcon className={"h-4 text-green-500"} />;
      case "down":
        return <ArrowSmallDownIcon className={"h-4 text-red-500"} />;
      case "stale":
        return <Bars2Icon className={"h-4 text-yellow-500"} />;
    }
  }, [props.trend]);

  return (
    <TileBadge trend={props.trend}>
      <span className={"flex items-center space-x-1"}>
        {Icon}
        <span>{props.children}</span>
      </span>
    </TileBadge>
  );
}

function TileBadge(
  props: React.PropsWithChildren<{
    trend: "up" | "down" | "stale";
  }>,
) {
  const className = `inline-flex items-center rounded-lg py-1 px-2.5 text-sm font-semibold justify-center`;

  if (props.trend === `up`) {
    return (
      <div
        className={`${className} bg-green-50 text-green-600 dark:bg-green-500/10`}
      >
        <span>{props.children}</span>
      </div>
    );
  }

  if (props.trend === `down`) {
    return (
      <div className={`${className} bg-red-50 text-red-600 dark:bg-red-500/10`}>
        <span>{props.children}</span>
      </div>
    );
  }

  return (
    <div
      className={`${className} bg-yellow-50 text-yellow-600 dark:bg-yellow-500/10`}
    >
      <span>{props.children}</span>
    </div>
  );
}

Tile.Header = TileHeader;
Tile.Heading = TileHeading;
Tile.Body = TileBody;
Tile.Figure = TileFigure;
Tile.Trend = TileTrend;
Tile.Badge = TileBadge;

export default Tile;


================================================
FILE: apps/web/components/ui/alert.tsx
================================================
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";

import { cn } from "@/lib/utils/common";

const alertVariants = cva(
  "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
  {
    variants: {
      variant: {
        default: "bg-background text-foreground",
        destructive:
          "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
      },
    },
    defaultVariants: {
      variant: "default",
    },
  },
);

const Alert = React.forwardRef<
  HTMLDivElement,
  React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
>(({ className, variant, ...props }, ref) => (
  <div
    ref={ref}
    role="alert"
    className={cn(alertVariants({ variant }), className)}
    {...props}
  />
));
Alert.displayName = "Alert";

const AlertTitle = React.forwardRef<
  HTMLParagraphElement,
  React.HTMLAttributes<HTMLHeadingElement>
>(({ className, ...props }, ref) => (
  <h5
    ref={ref}
    className={cn("mb-1 font-medium leading-none tracking-tight", className)}
    {...props}
  />
));
AlertTitle.displayName = "AlertTitle";

const AlertDescription = React.forwardRef<
  HTMLParagraphElement,
  React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => (
  <div
    ref={ref}
    className={cn("text-sm [&_p]:leading-relaxed", className)}
    {...props}
  />
));
AlertDescription.displayName = "AlertDescription";

export { Alert, AlertTitle, AlertDescription };


================================================
FILE: apps/web/components/ui/button.tsx
================================================
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import Link from "next/link";
import * as React from "react";

import { cn } from "@/lib/utils/common";

import If from "./If";
import Spinner from "./Spinner";

const buttonVariants = cva(
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
  {
    variants: {
      variant: {
        default:
          "bg-primary text-primary-foreground shadow hover:bg-primary/90",
        destructive:
          "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
        outline:
          "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
        secondary:
          "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
        ghost: "hover:bg-accent hover:text-accent-foreground",
        link: "text-primary underline-offset-4 hover:underline",
      },
      size: {
        default: "h-9 px-4 py-2",
        sm: "h-8 rounded-md px-3 text-xs",
        lg: "h-10 rounded-md px-8",
        icon: "h-9 w-9",
      },
    },
    defaultVariants: {
      variant: "default",
      size: "default",
    },
  },
);

export interface ButtonProps
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
    VariantProps<typeof buttonVariants> {
  asChild?: boolean;
  block?: boolean;
  round?: boolean;
  loading?: boolean;
  href?: Maybe<string>;
  target?: Maybe<React.HTMLAttributeAnchorTarget | undefined>;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
  (
    {
      className,
      variant,
      size,
      asChild = false,
      href,
      target,
      loading,
      children,
      ...props
    },
    ref,
  ) => {
    const Comp = asChild ? Slot : "button";
    return (
      <Comp
        className={cn(buttonVariants({ variant, size, className }))}
        ref={ref}
        {...props}
      >
        <InnerButtonContainerElement
          href={href}
          target={target}
          disabled={props.disabled}
        >
          <span
            className={cn(`flex w-full flex-1 items-center justify-center`)}
          >
            <If condition={loading}>
              <Animation />
            </If>

            {children}
          </span>
        </InnerButtonContainerElement>
      </Comp>
    );
  },
);
Button.displayName = "Button";

function Animation() {
  return (
    <span className={"mx-2"}>
      <Spinner className={"mx-auto !h-4 !w-4 fill-white dark:fill-white"} />
    </span>
  );
}

function InnerButtonContainerElement({
  children,
  href,
  target,
  disabled,
}: React.PropsWithChildren<{
  href: Maybe<string>;
  target: Maybe<React.HTMLAttributeAnchorTarget | undefined>;
  disabled?: boolean;
}>) {
  const className = `flex w-full h-full items-center transition-transform duration-500 ease-out`;

  if (href && !disabled) {
    return (
      <Link className={className} href={href} target={target}>
        {children}
      </Link>
    );
  }

  return <span className={className}>{children}</span>;
}

export { Button, buttonVariants };


================================================
FILE: apps/web/components/ui/calendar.tsx
================================================
"use client";

import { ChevronLeftIcon, ChevronRightIcon } from "@radix-ui/react-icons";
import * as React from "react";
import { DayPicker } from "react-day-picker";

import { buttonVariants } from "@/components/ui/button";

import { cn } from "@/lib/utils/common";

export type CalendarProps = React.ComponentProps<typeof DayPicker>;

function Calendar({
  className,
  classNames,
  showOutsideDays = true,
  ...props
}: CalendarProps) {
  return (
    <DayPicker
      showOutsideDays={showOutsideDays}
      className={cn("p-3", className)}
      classNames={{
        months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
        month: "space-y-4",
        caption: "flex justify-center pt-1 relative items-center",
        caption_label: "text-sm font-medium",
        nav: "space-x-1 flex items-center",
        nav_button: cn(
          buttonVariants({ variant: "outline" }),
          "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
        ),
        nav_button_previous: "absolute left-1",
        nav_button_next: "absolute right-1",
        table: "w-full border-collapse space-y-1",
        head_row: "flex",
        head_cell:
          "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
        row: "flex w-full mt-2",
        cell: cn(
          "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
          props.mode === "range"
            ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
            : "[&:has([aria-selected])]:rounded-md",
        ),
        day: cn(
          buttonVariants({ variant: "ghost" }),
          "h-8 w-8 p-0 font-normal aria-selected:opacity-100",
        ),
        day_range_start: "day-range-start",
        day_range_end: "day-range-end",
        day_selected:
          "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
        day_today: "bg-accent text-accent-foreground",
        day_outside:
          "day-outside text-muted-foreground opacity-50  aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
        day_disabled: "text-muted-foreground opacity-50",
        day_range_middle:
          "aria-selected:bg-accent aria-selected:text-accent-foreground",
        day_hidden: "invisible",
        ...classNames,
      }}
      components={{
        IconLeft: ({ ...props }) => <ChevronLeftIcon className="h-4 w-4" />,
        IconRight: ({ ...props }) => <ChevronRightIcon className="h-4 w-4" />,
      }}
      {...props}
    />
  );
}
Calendar.displayName = "Calendar";

export { Calendar };


================================================
FILE: apps/web/components/ui/form.tsx
================================================
import * as LabelPrimitive from "@radix-ui/react-label";
import { Slot } from "@radix-ui/react-slot";
import * as React from "react";
import {
  Controller,
  ControllerProps,
  FieldPath,
  FieldValues,
  FormProvider,
  useFormContext,
} from "react-hook-form";

import { Label } from "@/components/ui/label";

import { cn } from "@/lib/utils/common";

const Form = FormProvider;

type FormFieldContextValue<
  TFieldValues extends FieldValues = FieldValues,
  TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
> = {
  name: TName;
};

const FormFieldContext = React.createContext<FormFieldContextValue>(
  {} as FormFieldContextValue,
);

const FormField = <
  TFieldValues extends FieldValues = FieldValues,
  TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
>({
  ...props
}: ControllerProps<TFieldValues, TName>) => {
  return (
    <FormFieldContext.Provider value={{ name: props.name }}>
      <Controller {...props} />
    </FormFieldContext.Provider>
  );
};

const useFormField = () => {
  const fieldContext = React.useContext(FormFieldContext);
  const itemContext = React.useContext(FormItemContext);
  const { getFieldState, formState } = useFormContext();

  const fieldState = getFieldState(fieldContext.name, formState);

  if (!fieldContext) {
    throw new Error("useFormField should be used within <FormField>");
  }

  const { id } = itemContext;

  return {
    id,
    name: fieldContext.name,
    formItemId: `${id}-form-item`,
    formDescriptionId: `${id}-form-item-description`,
    formMessageId: `${id}-form-item-message`,
    ...fieldState,
  };
};

type FormItemContextValue = {
  id: string;
};

const FormItemContext = React.createContext<FormItemContextValue>(
  {} as FormItemContextValue,
);

const FormItem = React.forwardRef<
  HTMLDivElement,
  React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => {
  const id = React.useId();

  return (
    <FormItemContext.Provider value={{ id }}>
      <div ref={ref} className={cn("space-y-2", className)} {...props} />
    </FormItemContext.Provider>
  );
});
FormItem.displayName = "FormItem";

const FormLabel = React.forwardRef<
  React.ElementRef<typeof LabelPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
>(({ className, ...props }, ref) => {
  const { error, formItemId } = useFormField();

  return (
    <Label
      ref={ref}
      className={cn(error && "text-destructive", className)}
      htmlFor={formItemId}
      {...props}
    />
  );
});
FormLabel.displayName = "FormLabel";

const FormControl = React.forwardRef<
  React.ElementRef<typeof Slot>,
  React.ComponentPropsWithoutRef<typeof Slot>
>(({ ...props }, ref) => {
  const { error, formItemId, formDescriptionId, formMessageId } =
    useFormField();

  return (
    <Slot
      ref={ref}
      id={formItemId}
      aria-describedby={
        !error
          ? `${formDescriptionId}`
          : `${formDescriptionId} ${formMessageId}`
      }
      aria-invalid={!!error}
      {...props}
    />
  );
});
FormControl.displayName = "FormControl";

const FormDescription = React.forwardRef<
  HTMLParagraphElement,
  React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => {
  const { formDescriptionId } = useFormField();

  return (
    <p
      ref={ref}
      id={formDescriptionId}
      className={cn("text-[0.8rem] text-muted-foreground", className)}
      {...props}
    />
  );
});
FormDescription.displayName = "FormDescription";

const FormMessage = React.forwardRef<
  HTMLParagraphElement,
  React.HTMLAttributes<HTMLParagraphElement>
>(({ className, children, ...props }, ref) => {
  const { error, formMessageId } = useFormField();
  const body = error ? String(error?.message) : children;

  if (!body) {
    return null;
  }

  return (
    <p
      ref={ref}
      id={formMessageId}
      className={cn("text-[0.8rem] font-medium text-destructive", className)}
      {...props}
    >
      {body}
    </p>
  );
});
FormMessage.displayName = "FormMessage";

export {
  useFormField,
  Form,
  FormItem,
  FormLabel,
  FormControl,
  FormDescription,
  FormMessage,
  FormField,
};


================================================
FILE: apps/web/components/ui/input.tsx
================================================
import * as React from "react";

import { cn } from "@/lib/utils/common";

export interface InputProps
  extends React.InputHTMLAttributes<HTMLInputElement> {}

const Input = React.forwardRef<HTMLInputElement, InputProps>(
  ({ className, type, ...props }, ref) => {
    return (
      <input
        type={type}
        className={cn(
          "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
          className,
        )}
        ref={ref}
        {...props}
      />
    );
  },
);
Input.displayName = "Input";

export { Input };


================================================
FILE: apps/web/components/ui/label.tsx
================================================
"use client";

import * as LabelPrimitive from "@radix-ui/react-label";
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";

import { cn } from "@/lib/utils/common";

const labelVariants = cva(
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
);

const Label = React.forwardRef<
  React.ElementRef<typeof LabelPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
    VariantProps<typeof labelVariants>
>(({ className, ...props }, ref) => (
  <LabelPrimitive.Root
    ref={ref}
    className={cn(labelVariants(), className)}
    {...props}
  />
));
Label.displayName = LabelPrimitive.Root.displayName;

export { Label };


================================================
FILE: apps/web/components/ui/popover.tsx
================================================
"use client";

import * as PopoverPrimitive from "@radix-ui/react-popover";
import * as React from "react";

import { cn } from "@/lib/utils/common";

const Popover = PopoverPrimitive.Root;

const PopoverTrigger = PopoverPrimitive.Trigger;

const PopoverAnchor = PopoverPrimitive.Anchor;

const PopoverContent = React.forwardRef<
  React.ElementRef<typeof PopoverPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
  <PopoverPrimitive.Portal>
    <PopoverPrimitive.Content
      ref={ref}
      align={align}
      sideOffset={sideOffset}
      className={cn(
        "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
        className,
      )}
      {...props}
    />
  </PopoverPrimitive.Portal>
));
PopoverContent.displayName = PopoverPrimitive.Content.displayName;

export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };


================================================
FILE: apps/web/components/ui/radio-group.tsx
================================================
"use client";

import { CheckIcon } from "@radix-ui/react-icons";
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
import * as React from "react";

import { cn } from "@/lib/utils/common";

const RadioGroup = React.forwardRef<
  React.ElementRef<typeof RadioGroupPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
>(({ className, ...props }, ref) => {
  return (
    <RadioGroupPrimitive.Root
      className={cn("grid gap-2", className)}
      {...props}
      ref={ref}
    />
  );
});
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;

const RadioGroupItem = React.forwardRef<
  React.ElementRef<typeof RadioGroupPrimitive.Item>,
  React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
>(({ className, ...props }, ref) => {
  return (
    <RadioGroupPrimitive.Item
      ref={ref}
      className={cn(
        "aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
        className,
      )}
      {...props}
    >
      <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
        <CheckIcon className="h-3.5 w-3.5 fill-primary" />
      </RadioGroupPrimitive.Indicator>
    </RadioGroupPrimitive.Item>
  );
});
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;

export { RadioGroup, RadioGroupItem };


================================================
FILE: apps/web/components/ui/select.tsx
================================================
"use client";

import {
  CaretSortIcon,
  CheckIcon,
  ChevronDownIcon,
  ChevronUpIcon,
} from "@radix-ui/react-icons";
import * as SelectPrimitive from "@radix-ui/react-select";
import * as React from "react";

import { cn } from "@/lib/utils/common";

const Select = SelectPrimitive.Root;

const SelectGroup = SelectPrimitive.Group;

const SelectValue = SelectPrimitive.Value;

const SelectTrigger = React.forwardRef<
  React.ElementRef<typeof SelectPrimitive.Trigger>,
  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
  <SelectPrimitive.Trigger
    ref={ref}
    className={cn(
      "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
      className,
    )}
    {...props}
  >
    {children}
    <SelectPrimitive.Icon asChild>
      <CaretSortIcon className="h-4 w-4 opacity-50" />
    </SelectPrimitive.Icon>
  </SelectPrimitive.Trigger>
));
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;

const SelectScrollUpButton = React.forwardRef<
  React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
  React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
>(({ className, ...props }, ref) => (
  <SelectPrimitive.ScrollUpButton
    ref={ref}
    className={cn(
      "flex cursor-default items-center justify-center py-1",
      className,
    )}
    {...props}
  >
    <ChevronUpIcon />
  </SelectPrimitive.ScrollUpButton>
));
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;

const SelectScrollDownButton = React.forwardRef<
  React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
  React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
>(({ className, ...props }, ref) => (
  <SelectPrimitive.ScrollDownButton
    ref={ref}
    className={cn(
      "flex cursor-default items-center justify-center py-1",
      className,
    )}
    {...props}
  >
    <ChevronDownIcon />
  </SelectPrimitive.ScrollDownButton>
));
SelectScrollDownButton.displayName =
  SelectPrimitive.ScrollDownButton.displayName;

const SelectContent = React.forwardRef<
  React.ElementRef<typeof SelectPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
>(({ className, children, position = "popper", ...props }, ref) => (
  <SelectPrimitive.Portal>
    <SelectPrimitive.Content
      ref={ref}
      className={cn(
        "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
        position === "popper" &&
          "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
        className,
      )}
      position={position}
      {...props}
    >
      <SelectScrollUpButton />
      <SelectPrimitive.Viewport
        className={cn(
          "p-1",
          position === "popper" &&
            "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
        )}
      >
        {children}
      </SelectPrimitive.Viewport>
      <SelectScrollDownButton />
    </SelectPrimitive.Content>
  </SelectPrimitive.Portal>
));
SelectContent.displayName = SelectPrimitive.Content.displayName;

const SelectLabel = React.forwardRef<
  React.ElementRef<typeof SelectPrimitive.Label>,
  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
>(({ className, ...props }, ref) => (
  <SelectPrimitive.Label
    ref={ref}
    className={cn("px-2 py-1.5 text-sm font-semibold", className)}
    {...props}
  />
));
SelectLabel.displayName = SelectPrimitive.Label.displayName;

const SelectItem = React.forwardRef<
  React.ElementRef<typeof SelectPrimitive.Item>,
  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
>
Download .txt
gitextract_3ya7ae53/

├── .github/
│   ├── CONTRIBUTING.md
│   ├── CONTRIBUTORS.md
│   ├── ISSUE_TEMPLATE /
│   │   ├── BUG-REPORT.yml
│   │   ├── FEATURE-REQUEST.yml
│   │   └── config.yml
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── settings.yml
├── .gitignore
├── .husky/
│   ├── pre-commit
│   └── pre-push
├── .prettierignore
├── .prettierrc
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── apps/
│   └── web/
│       ├── .gitignore
│       ├── README.md
│       ├── app/
│       │   ├── (default)/
│       │   │   ├── components/
│       │   │   │   ├── Content.tsx
│       │   │   │   ├── Header.tsx
│       │   │   │   ├── Hero.tsx
│       │   │   │   └── ModalVideo.tsx
│       │   │   ├── layout.tsx
│       │   │   └── page.tsx
│       │   ├── api/
│       │   │   ├── auth/
│       │   │   │   └── [...nextauth]/
│       │   │   │       ├── options.ts
│       │   │   │       └── route.ts
│       │   │   └── shareholder/
│       │   │       └── route.ts
│       │   ├── auth/
│       │   │   ├── error/
│       │   │   │   └── page.tsx
│       │   │   ├── signin/
│       │   │   │   ├── components/
│       │   │   │   │   └── GoogleLogin.tsx
│       │   │   │   └── page.tsx
│       │   │   └── signout/
│       │   │       └── page.tsx
│       │   ├── dashboard/
│       │   │   ├── 401-a/
│       │   │   │   └── page.tsx
│       │   │   ├── cap-table/
│       │   │   │   ├── components/
│       │   │   │   │   ├── AddNewOptionForm/
│       │   │   │   │   │   ├── DateField.tsx
│       │   │   │   │   │   ├── Form.tsx
│       │   │   │   │   │   ├── RadioGroupField.tsx
│       │   │   │   │   │   ├── SelectField.tsx
│       │   │   │   │   │   ├── SwitchField.tsx
│       │   │   │   │   │   └── TextField.tsx
│       │   │   │   │   ├── DownloadCaptable.tsx
│       │   │   │   │   └── OptionsTable.tsx
│       │   │   │   ├── new/
│       │   │   │   │   ├── context/
│       │   │   │   │   │   └── new-cap-table.tsx
│       │   │   │   │   ├── page.tsx
│       │   │   │   │   ├── schema.ts
│       │   │   │   │   └── types.ts
│       │   │   │   └── page.tsx
│       │   │   ├── equity-plans/
│       │   │   │   ├── components/
│       │   │   │   │   ├── EquityPlansTable.tsx
│       │   │   │   │   └── NewEquityPlanForm/
│       │   │   │   │       ├── DateField.tsx
│       │   │   │   │       ├── EquityRetired.tsx
│       │   │   │   │       ├── FieldWithType.tsx
│       │   │   │   │       ├── InitialPlanSize.tsx
│       │   │   │   │       ├── ShareClassSelect.tsx
│       │   │   │   │       ├── TermsOfPlan.tsx
│       │   │   │   │       └── index.tsx
│       │   │   │   ├── new/
│       │   │   │   │   └── page.tsx
│       │   │   │   └── page.tsx
│       │   │   ├── layout.tsx
│       │   │   ├── page.tsx
│       │   │   ├── rule-701/
│       │   │   │   └── page.tsx
│       │   │   ├── settings/
│       │   │   │   └── page.tsx
│       │   │   └── share-classes/
│       │   │       ├── components/
│       │   │       │   ├── NewShareClassForm/
│       │   │       │   │   ├── AdvancedSettings.tsx
│       │   │       │   │   ├── ClassType.tsx
│       │   │       │   │   ├── DateField.tsx
│       │   │       │   │   ├── Information.tsx
│       │   │       │   │   ├── RadioGroupField.tsx
│       │   │       │   │   ├── TextField.tsx
│       │   │       │   │   └── index.tsx
│       │   │       │   └── ShareClassesTable.tsx
│       │   │       ├── new/
│       │   │       │   └── page.tsx
│       │   │       └── page.tsx
│       │   ├── globals.css
│       │   ├── layout.tsx
│       │   └── not-found.tsx
│       ├── components/
│       │   ├── CapTableBanner.tsx
│       │   ├── Logo/
│       │   │   ├── Logo.tsx
│       │   │   ├── LogoImage.tsx
│       │   │   └── index.ts
│       │   ├── WorkInProgress.tsx
│       │   ├── layout/
│       │   │   └── NavBar/
│       │   │       └── index.tsx
│       │   └── ui/
│       │       ├── Container.tsx
│       │       ├── Heading.tsx
│       │       ├── If.tsx
│       │       ├── Spinner.tsx
│       │       ├── Tile.tsx
│       │       ├── alert.tsx
│       │       ├── button.tsx
│       │       ├── calendar.tsx
│       │       ├── form.tsx
│       │       ├── input.tsx
│       │       ├── label.tsx
│       │       ├── popover.tsx
│       │       ├── radio-group.tsx
│       │       ├── select.tsx
│       │       ├── switch.tsx
│       │       ├── table.tsx
│       │       └── textarea.tsx
│       ├── components.json
│       ├── content/
│       │   ├── community-digest-summer-edition.mdx
│       │   ├── create-and-deploy-a-blog-with-simple.mdx
│       │   ├── getting-started-with-nextjs.mdx
│       │   ├── getting-started-with-vuejs-and-stripe.mdx
│       │   ├── how-to-identify-high-intent-leads.mdx
│       │   ├── how-to-work-with-friendly-apis.mdx
│       │   ├── introducing-the-testing-field-guide.mdx
│       │   └── why-we-think-simple-is-good-for-developers.mdx
│       ├── contentlayer.config.js
│       ├── core/
│       │   ├── constants/
│       │   │   └── configs.ts
│       │   ├── prisma.ts
│       │   └── types/
│       │       └── common.type.ts
│       ├── global.d.ts
│       ├── lib/
│       │   ├── server/
│       │   │   └── session.ts
│       │   └── utils/
│       │       └── common.ts
│       ├── next.config.js
│       ├── package.json
│       ├── postcss.config.js
│       ├── prisma/
│       │   ├── migrations/
│       │   │   ├── 20240110170446_nextauth_schema/
│       │   │   │   └── migration.sql
│       │   │   ├── 20240110175417_basic_captable/
│       │   │   │   └── migration.sql
│       │   │   ├── 20240111041700_remove_relation_mode/
│       │   │   │   └── migration.sql
│       │   │   ├── 20240111055724_remove_company_as_notnullable_from_user_table/
│       │   │   │   └── migration.sql
│       │   │   └── migration_lock.toml
│       │   └── schema.prisma
│       ├── tailwind.config.js
│       └── tsconfig.json
├── docker-compose.yml
├── package.json
├── pnpm-workspace.yaml
└── turbo.json
Download .txt
SYMBOL INDEX (89 symbols across 37 files)

FILE: apps/web/app/(default)/components/Header.tsx
  function Header (line 10) | function Header() {

FILE: apps/web/app/(default)/components/ModalVideo.tsx
  type ModalVideoProps (line 8) | interface ModalVideoProps {
  function ModalVideo (line 18) | function ModalVideo({

FILE: apps/web/app/(default)/layout.tsx
  function DefaultLayout (line 9) | function DefaultLayout({

FILE: apps/web/app/(default)/page.tsx
  function Home (line 11) | function Home() {

FILE: apps/web/app/api/shareholder/route.ts
  type ShareholderInput (line 8) | type ShareholderInput = {
  function POST (line 18) | async function POST(request: Request, response: Response) {

FILE: apps/web/app/auth/signin/components/GoogleLogin.tsx
  function GoogleLogin (line 10) | function GoogleLogin() {

FILE: apps/web/app/dashboard/cap-table/components/AddNewOptionForm/Form.tsx
  function onSubmit (line 41) | function onSubmit(values: NewOptionsFormValues) {

FILE: apps/web/app/dashboard/cap-table/components/OptionsTable.tsx
  type OptionCapTable (line 12) | type OptionCapTable = {

FILE: apps/web/app/dashboard/cap-table/new/context/new-cap-table.tsx
  type NewCapTableContextType (line 8) | type NewCapTableContextType = {

FILE: apps/web/app/dashboard/cap-table/new/schema.ts
  type NewOptionsFormValues (line 33) | type NewOptionsFormValues = z.infer<typeof newOptionsFormSchema>;

FILE: apps/web/app/dashboard/cap-table/new/types.ts
  type NewOptionsFormFieldType (line 5) | type NewOptionsFormFieldType = {

FILE: apps/web/app/dashboard/equity-plans/components/EquityPlansTable.tsx
  type EquityPlan (line 10) | type EquityPlan = {

FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/FieldWithType.tsx
  type Props (line 23) | type Props = {

FILE: apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/index.tsx
  function onSubmit (line 109) | function onSubmit(values: z.infer<typeof newEquityPlanFormSchema>) {

FILE: apps/web/app/dashboard/layout.tsx
  function DashboardLayout (line 7) | async function DashboardLayout({

FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/RadioGroupField.tsx
  type Props (line 15) | type Props = {

FILE: apps/web/app/dashboard/share-classes/components/NewShareClassForm/index.tsx
  function onSubmit (line 67) | function onSubmit(values: z.infer<typeof newShareClassFormSchema>) {

FILE: apps/web/app/dashboard/share-classes/components/ShareClassesTable.tsx
  type ShareClass (line 10) | type ShareClass = {

FILE: apps/web/app/layout.tsx
  function RootLayout (line 22) | function RootLayout({

FILE: apps/web/app/not-found.tsx
  function NotFound (line 3) | function NotFound() {

FILE: apps/web/components/CapTableBanner.tsx
  function CapTableBanner (line 1) | function CapTableBanner() {

FILE: apps/web/components/layout/NavBar/index.tsx
  function NavBar (line 70) | function NavBar({ user }: { user: Session["user"] | null }) {

FILE: apps/web/components/ui/Heading.tsx
  type HeadingType (line 3) | type HeadingType = 1 | 2 | 3 | 4 | 5 | 6;

FILE: apps/web/components/ui/If.tsx
  type Condition (line 3) | type Condition<Value = unknown> = Value | Falsy;
  function If (line 5) | function If<Value = unknown>({

FILE: apps/web/components/ui/Spinner.tsx
  function Spinner (line 3) | function Spinner(

FILE: apps/web/components/ui/Tile.tsx
  function TileHeader (line 33) | function TileHeader(props: React.PropsWithChildren) {
  function TileHeading (line 37) | function TileHeading(props: React.PropsWithChildren) {
  function TileBody (line 47) | function TileBody(props: React.PropsWithChildren) {
  function TileFigure (line 51) | function TileFigure(props: React.PropsWithChildren) {
  function TileTrend (line 55) | function TileTrend(
  function TileBadge (line 81) | function TileBadge(

FILE: apps/web/components/ui/button.tsx
  type ButtonProps (line 41) | interface ButtonProps
  function Animation (line 95) | function Animation() {
  function InnerButtonContainerElement (line 103) | function InnerButtonContainerElement({

FILE: apps/web/components/ui/calendar.tsx
  type CalendarProps (line 11) | type CalendarProps = React.ComponentProps<typeof DayPicker>;
  function Calendar (line 13) | function Calendar({

FILE: apps/web/components/ui/form.tsx
  type FormFieldContextValue (line 19) | type FormFieldContextValue<
  type FormItemContextValue (line 66) | type FormItemContextValue = {

FILE: apps/web/components/ui/input.tsx
  type InputProps (line 5) | interface InputProps

FILE: apps/web/components/ui/textarea.tsx
  type TextareaProps (line 5) | interface TextareaProps

FILE: apps/web/core/constants/configs.ts
  constant FINGERPRINT_HEADER (line 48) | const FINGERPRINT_HEADER = "x-fingerprint";
  constant X_CSRF_TOKEN_HEADER (line 49) | const X_CSRF_TOKEN_HEADER = "X-CSRF-Token";

FILE: apps/web/core/types/common.type.ts
  type ObjectString (line 1) | type ObjectString = Record<string, string>;
  type ValueOf (line 3) | type ValueOf<T> = T[keyof T];
  type ServerPageProps (line 5) | type ServerPageProps<Params = any, SearchParams = any> = {
  type ReactComponentProps (line 10) | type ReactComponentProps<Props = Record<string, unknown>> =

FILE: apps/web/global.d.ts
  type StringObject (line 2) | type StringObject = Record<string, string>;
  type NumberObject (line 3) | type NumberObject = Record<string, number>;
  type UnknownObject (line 4) | type UnknownObject = Record<string, unknown>;
  type BooleanObject (line 5) | type BooleanObject = Record<string, boolean>;
  type UnixTimestamp (line 6) | type UnixTimestamp = number;
  type WithId (line 8) | type WithId<T> = T & {
  type Truthy (line 12) | type Truthy<T> = false extends T
  type Falsy (line 24) | type Falsy = false | 0 | "" | null | undefined;
  type Maybe (line 25) | type Maybe<T> = T | undefined;
  type EmptyCallback (line 27) | type EmptyCallback = () => void;
  type HttpMethod (line 29) | type HttpMethod = `GET` | `POST` | `PUT` | "PATCH" | "DELETE" | "HEAD";
  type FCC (line 33) | type FCC<Props = Record<string, unknown>> = React.FC<

FILE: apps/web/lib/utils/common.ts
  function cn (line 4) | function cn(...inputs: ClassValue[]) {

FILE: apps/web/prisma/migrations/20240110170446_nextauth_schema/migration.sql
  type "User" (line 2) | CREATE TABLE "User" (
  type "Account" (line 14) | CREATE TABLE "Account" (
  type "Session" (line 32) | CREATE TABLE "Session" (
  type "VerificationToken" (line 42) | CREATE TABLE "VerificationToken" (
  type "Token" (line 49) | CREATE TABLE "Token" (
  type "User" (line 64) | CREATE UNIQUE INDEX "User_email_key" ON "User"("email")
  type "Account" (line 67) | CREATE INDEX "Account_userId_idx" ON "Account"("userId")
  type "Account" (line 70) | CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account...
  type "Session" (line 73) | CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken")
  type "Session" (line 76) | CREATE INDEX "Session_userId_idx" ON "Session"("userId")
  type "VerificationToken" (line 79) | CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"...
  type "VerificationToken" (line 82) | CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "Verific...
  type "Token" (line 85) | CREATE UNIQUE INDEX "Token_hashedKey_key" ON "Token"("hashedKey")
  type "Token" (line 88) | CREATE INDEX "Token_userId_idx" ON "Token"("userId")

FILE: apps/web/prisma/migrations/20240110175417_basic_captable/migration.sql
  type "Company" (line 12) | CREATE TABLE "Company" (
  type "EquityInstrument" (line 22) | CREATE TABLE "EquityInstrument" (
  type "Shareholder" (line 32) | CREATE TABLE "Shareholder" (
  type "Shareholding" (line 41) | CREATE TABLE "Shareholding" (
  type "Transaction" (line 52) | CREATE TABLE "Transaction" (
  type "CapTable" (line 63) | CREATE TABLE "CapTable" (
  type "EquityInstrument" (line 72) | CREATE INDEX "EquityInstrument_companyId_idx" ON "EquityInstrument"("com...
  type "Shareholder" (line 75) | CREATE INDEX "Shareholder_userId_idx" ON "Shareholder"("userId")
  type "Shareholding" (line 78) | CREATE INDEX "Shareholding_shareholderId_idx" ON "Shareholding"("shareho...
  type "Shareholding" (line 81) | CREATE INDEX "Shareholding_instrumentId_idx" ON "Shareholding"("instrume...
  type "Transaction" (line 84) | CREATE INDEX "Transaction_shareholdingId_idx" ON "Transaction"("sharehol...
  type "CapTable" (line 87) | CREATE INDEX "CapTable_companyId_idx" ON "CapTable"("companyId")
  type "User" (line 90) | CREATE INDEX "User_companyId_idx" ON "User"("companyId")
Condensed preview — 125 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (268K chars).
[
  {
    "path": ".github/CONTRIBUTING.md",
    "chars": 2169,
    "preview": "# Contributing\n\n## Request for changes/ Pull Requests\n\nYou first need to create a fork of the [cap.octolane.com](https:/"
  },
  {
    "path": ".github/CONTRIBUTORS.md",
    "chars": 1431,
    "preview": "> ## ProTips:\n>\n> This is maybe the most important file of your project if you think about maintanability and long-term "
  },
  {
    "path": ".github/ISSUE_TEMPLATE /BUG-REPORT.yml",
    "chars": 2059,
    "preview": "name: \"🐛 Bug Report\"\ndescription: Create a new ticket for a bug.\ntitle: \"🐛 [BUG] - <title>\"\nlabels: [\n  \"bug\"\n]\nbody:\n  "
  },
  {
    "path": ".github/ISSUE_TEMPLATE /FEATURE-REQUEST.yml",
    "chars": 1782,
    "preview": "name: \"💡 Feature Request\"\ndescription: Create a new ticket for a new feature request\ntitle: \"💡 [REQUEST] - <title>\"\nlabe"
  },
  {
    "path": ".github/ISSUE_TEMPLATE /config.yml",
    "chars": 472,
    "preview": "blank_issues_enabled: false\ncontact_links:\n    - name: One Chowdhury\n      url: mailto:one@octolane.com\n      about: CEO"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 1096,
    "preview": "# Pull Request Process\n\n## Before submitting a pull request\n\n> Ask contributors to ensure that any install or build depe"
  },
  {
    "path": ".github/settings.yml",
    "chars": 2106,
    "preview": "repository:\n# Labels: define labels for Issues and Pull Requests\nlabels:\n    - name: 'Type: Bug'\n      color: e80c0c\n   "
  },
  {
    "path": ".gitignore",
    "chars": 439,
    "preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\nnode_modules\ndist/"
  },
  {
    "path": ".husky/pre-commit",
    "chars": 65,
    "preview": "#!/usr/bin/env sh\n. \"$(dirname -- \"$0\")/_/husky.sh\"\n\npnpm format\n"
  },
  {
    "path": ".husky/pre-push",
    "chars": 52,
    "preview": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\npnpm build"
  },
  {
    "path": ".prettierignore",
    "chars": 45,
    "preview": "node_modules\npnpm-lock.yaml\n.next\n.turbo\ndist"
  },
  {
    "path": ".prettierrc",
    "chars": 540,
    "preview": "{\n  \"singleQuote\": false,\n  \"trailingComma\": \"all\",\n  \"arrowParens\": \"avoid\",\n  \"tabWidth\": 2,\n  \"semi\": true,\n  \"useTab"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 55,
    "preview": "# CHANGELOG.md\n\n## [1.0.0] - 2024-01-11\n\nFirst release\n"
  },
  {
    "path": "LICENSE.md",
    "chars": 34273,
    "preview": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\nCopyright (C) "
  },
  {
    "path": "README.md",
    "chars": 1503,
    "preview": "## Introduction\n\ncap.octolane.com is the open-source cap table management infrastructure for all founders and investors."
  },
  {
    "path": "apps/web/.gitignore",
    "chars": 415,
    "preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
  },
  {
    "path": "apps/web/README.md",
    "chars": 1748,
    "preview": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js"
  },
  {
    "path": "apps/web/app/(default)/components/Content.tsx",
    "chars": 9863,
    "preview": "\"use client\";\n\nimport { Transition } from \"@headlessui/react\";\nimport { useEffect, useRef, useState } from \"react\";\n\ncon"
  },
  {
    "path": "apps/web/app/(default)/components/Header.tsx",
    "chars": 1838,
    "preview": "\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\nimport { configuration } from \"@/core/constants/configs\";\n\n"
  },
  {
    "path": "apps/web/app/(default)/components/Hero.tsx",
    "chars": 3889,
    "preview": "import VideoThumb from \"@/public/images/captable.gif\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";"
  },
  {
    "path": "apps/web/app/(default)/components/ModalVideo.tsx",
    "chars": 5201,
    "preview": "\"use client\";\n\nimport { Dialog, Transition } from \"@headlessui/react\";\nimport type { StaticImageData } from \"next/image\""
  },
  {
    "path": "apps/web/app/(default)/layout.tsx",
    "chars": 1750,
    "preview": "\"use client\";\n\nimport AOS from \"aos\";\nimport \"aos/dist/aos.css\";\nimport { Fragment, useEffect } from \"react\";\n\nimport He"
  },
  {
    "path": "apps/web/app/(default)/page.tsx",
    "chars": 371,
    "preview": "import { Fragment } from \"react\";\n\nimport HomepageContent from \"./components/Content\";\nimport HomepageHero from \"./compo"
  },
  {
    "path": "apps/web/app/api/auth/[...nextauth]/options.ts",
    "chars": 806,
    "preview": "import { PrismaAdapter } from \"@next-auth/prisma-adapter\";\nimport type { NextAuthOptions } from \"next-auth\";\nimport Goog"
  },
  {
    "path": "apps/web/app/api/auth/[...nextauth]/route.ts",
    "chars": 186,
    "preview": "import NextAuth from \"next-auth/next\";\n\nimport { nextAuthOptions } from \"./options\";\n\nconst authHandler = NextAuth(nextA"
  },
  {
    "path": "apps/web/app/api/shareholder/route.ts",
    "chars": 1154,
    "preview": "import { HttpStatusCode } from \"axios\";\nimport * as yup from \"yup\";\n\nimport { prisma } from \"@/core/prisma\";\n\nimport { c"
  },
  {
    "path": "apps/web/app/auth/error/page.tsx",
    "chars": 867,
    "preview": "import { nextAuthOptions } from \"@/app/api/auth/[...nextauth]/options\";\nimport { getServerSession } from \"next-auth\";\nim"
  },
  {
    "path": "apps/web/app/auth/signin/components/GoogleLogin.tsx",
    "chars": 571,
    "preview": "\"use client\";\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { signIn } from \"next-auth/react"
  },
  {
    "path": "apps/web/app/auth/signin/page.tsx",
    "chars": 692,
    "preview": "import { nextAuthOptions } from \"@/app/api/auth/[...nextauth]/options\";\nimport { getServerSession } from \"next-auth\";\nim"
  },
  {
    "path": "apps/web/app/auth/signout/page.tsx",
    "chars": 247,
    "preview": "\"use client\";\n\nimport { signOut, useSession } from \"next-auth/react\";\nimport { useEffect } from \"react\";\n\nconst SignOutP"
  },
  {
    "path": "apps/web/app/dashboard/401-a/page.tsx",
    "chars": 239,
    "preview": "import WorkInProgress from \"@/components/WorkInProgress\";\n\nexport const metadata = {\n  title: \"401 A\",\n};\n\nconst FourZer"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/components/AddNewOptionForm/DateField.tsx",
    "chars": 2125,
    "preview": "import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport { format } from \"date-fns\";\n\nimport { Button } from \"@/comp"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/components/AddNewOptionForm/Form.tsx",
    "chars": 6332,
    "preview": "\"use client\";\n\nimport { useRouter } from \"next/navigation\";\nimport { toast } from \"sonner\";\n\nimport { configuration } fr"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/components/AddNewOptionForm/RadioGroupField.tsx",
    "chars": 1455,
    "preview": "import {\n  FormControl,\n  FormField,\n  FormItem,\n  FormLabel,\n  FormMessage,\n} from \"@/components/ui/form\";\nimport { Rad"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/components/AddNewOptionForm/SelectField.tsx",
    "chars": 1361,
    "preview": "import {\n  FormControl,\n  FormField,\n  FormItem,\n  FormLabel,\n  FormMessage,\n} from \"@/components/ui/form\";\nimport {\n  S"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/components/AddNewOptionForm/SwitchField.tsx",
    "chars": 866,
    "preview": "import {\n  FormControl,\n  FormField,\n  FormItem,\n  FormLabel,\n} from \"@/components/ui/form\";\nimport { Switch } from \"@/c"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/components/AddNewOptionForm/TextField.tsx",
    "chars": 1247,
    "preview": "import {\n  FormControl,\n  FormField,\n  FormItem,\n  FormLabel,\n  FormMessage,\n} from \"@/components/ui/form\";\nimport { Inp"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/components/DownloadCaptable.tsx",
    "chars": 378,
    "preview": "\"use client\";\n\nimport { toast } from \"sonner\";\n\nimport { Button } from \"@/components/ui/button\";\n\nconst DownloadCaptable"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/components/OptionsTable.tsx",
    "chars": 2492,
    "preview": "import {\n  Table,\n  TableBody,\n  TableCell,\n  TableHead,\n  TableHeader,\n  TableRow,\n} from \"@/components/ui/table\";\n\nimp"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/new/context/new-cap-table.tsx",
    "chars": 1165,
    "preview": "\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport { UseFormReturn, useForm } from \"react-hook-for"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/new/page.tsx",
    "chars": 849,
    "preview": "import Container from \"@/components/ui/Container\";\nimport Tile from \"@/components/ui/Tile\";\n\nimport AddNewOptionForm fro"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/new/schema.ts",
    "chars": 913,
    "preview": "import * as z from \"zod\";\n\nexport const newOptionsFormSchema = z.object({\n  // Attach Signed Option Grants\n  signedDocum"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/new/types.ts",
    "chars": 338,
    "preview": "import { HTMLInputTypeAttribute } from \"react\";\n\nimport { NewOptionsFormValues } from \"./schema\";\n\nexport type NewOption"
  },
  {
    "path": "apps/web/app/dashboard/cap-table/page.tsx",
    "chars": 988,
    "preview": "import { configuration } from \"@/core/constants/configs\";\n\nimport Container from \"@/components/ui/Container\";\nimport Til"
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/components/EquityPlansTable.tsx",
    "chars": 2210,
    "preview": "import {\n  Table,\n  TableBody,\n  TableCell,\n  TableHead,\n  TableHeader,\n  TableRow,\n} from \"@/components/ui/table\";\n\ntyp"
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/DateField.tsx",
    "chars": 2186,
    "preview": "import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport { format } from \"date-fns\";\nimport { Control } from \"react-"
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/EquityRetired.tsx",
    "chars": 898,
    "preview": "import { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nimport {\n  FormControl,\n  FormField,\n  FormItem,\n "
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/FieldWithType.tsx",
    "chars": 2679,
    "preview": "import { HTMLInputTypeAttribute } from \"react\";\nimport { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nim"
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/InitialPlanSize.tsx",
    "chars": 916,
    "preview": "import { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nimport {\n  FormControl,\n  FormField,\n  FormItem,\n "
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/ShareClassSelect.tsx",
    "chars": 1108,
    "preview": "import { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nimport {\n  FormControl,\n  FormField,\n  FormItem,\n "
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/TermsOfPlan.tsx",
    "chars": 899,
    "preview": "import { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nimport {\n  FormControl,\n  FormField,\n  FormItem,\n "
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/components/NewEquityPlanForm/index.tsx",
    "chars": 5099,
    "preview": "\"use client\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useRouter } from \"next/navigation\";\nimpor"
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/new/page.tsx",
    "chars": 577,
    "preview": "import Container from \"@/components/ui/Container\";\nimport Tile from \"@/components/ui/Tile\";\n\nimport NewEquityPlanForm fr"
  },
  {
    "path": "apps/web/app/dashboard/equity-plans/page.tsx",
    "chars": 848,
    "preview": "import { configuration } from \"@/core/constants/configs\";\n\nimport Container from \"@/components/ui/Container\";\nimport Til"
  },
  {
    "path": "apps/web/app/dashboard/layout.tsx",
    "chars": 533,
    "preview": "import { redirect } from \"next/navigation\";\n\nimport NavBar from \"@/components/layout/NavBar\";\n\nimport { getCurrentUser }"
  },
  {
    "path": "apps/web/app/dashboard/page.tsx",
    "chars": 1249,
    "preview": "import { ArrowTopRightOnSquareIcon } from \"@heroicons/react/20/solid\";\nimport Link from \"next/link\";\n\nimport { configura"
  },
  {
    "path": "apps/web/app/dashboard/rule-701/page.tsx",
    "chars": 232,
    "preview": "import WorkInProgress from \"@/components/WorkInProgress\";\n\nexport const metadata = {\n  title: \"Rule 701\",\n};\n\nconst Rule"
  },
  {
    "path": "apps/web/app/dashboard/settings/page.tsx",
    "chars": 234,
    "preview": "import WorkInProgress from \"@/components/WorkInProgress\";\n\nexport const metadata = {\n  title: \"Settings\",\n};\n\nconst Sett"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/components/NewShareClassForm/AdvancedSettings.tsx",
    "chars": 1961,
    "preview": "import { Fragment } from \"react\";\nimport { UseFormReturn } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nimport Til"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/components/NewShareClassForm/ClassType.tsx",
    "chars": 1325,
    "preview": "import { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nimport Tile from \"@/components/ui/Tile\";\nimport {\n"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/components/NewShareClassForm/DateField.tsx",
    "chars": 2186,
    "preview": "import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport { format } from \"date-fns\";\nimport { Control } from \"react-"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/components/NewShareClassForm/Information.tsx",
    "chars": 1697,
    "preview": "import { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nimport Tile from \"@/components/ui/Tile\";\n\nimport D"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/components/NewShareClassForm/RadioGroupField.tsx",
    "chars": 1561,
    "preview": "import { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nimport {\n  FormControl,\n  FormField,\n  FormItem,\n "
  },
  {
    "path": "apps/web/app/dashboard/share-classes/components/NewShareClassForm/TextField.tsx",
    "chars": 1346,
    "preview": "import { HTMLInputTypeAttribute } from \"react\";\nimport { Control } from \"react-hook-form\";\nimport * as z from \"zod\";\n\nim"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/components/NewShareClassForm/index.tsx",
    "chars": 2489,
    "preview": "\"use client\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useRouter } from \"next/navigation\";\nimpor"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/components/ShareClassesTable.tsx",
    "chars": 1593,
    "preview": "import {\n  Table,\n  TableBody,\n  TableCell,\n  TableHead,\n  TableHeader,\n  TableRow,\n} from \"@/components/ui/table\";\n\ntyp"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/new/page.tsx",
    "chars": 714,
    "preview": "import Container from \"@/components/ui/Container\";\nimport Tile from \"@/components/ui/Tile\";\n\nimport NewShareClassForm fr"
  },
  {
    "path": "apps/web/app/dashboard/share-classes/page.tsx",
    "chars": 860,
    "preview": "import { configuration } from \"@/core/constants/configs\";\n\nimport Container from \"@/components/ui/Container\";\nimport Til"
  },
  {
    "path": "apps/web/app/globals.css",
    "chars": 849,
    "preview": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n  :root {\n    --background: 0 0% 100%;\n    --f"
  },
  {
    "path": "apps/web/app/layout.tsx",
    "chars": 1008,
    "preview": "import { Analytics } from \"@vercel/analytics/react\";\nimport { Inter } from \"next/font/google\";\nimport { Toaster } from \""
  },
  {
    "path": "apps/web/app/not-found.tsx",
    "chars": 1645,
    "preview": "import Link from \"next/link\";\n\nexport default function NotFound() {\n  return (\n    <section className=\"relative\">\n      "
  },
  {
    "path": "apps/web/components/CapTableBanner.tsx",
    "chars": 567,
    "preview": "export default function CapTableBanner() {\n  return (\n    <div className=\"w-full flex items-center justify-center bg-gra"
  },
  {
    "path": "apps/web/components/Logo/Logo.tsx",
    "chars": 316,
    "preview": "import Link from \"next/link\";\nimport React from \"react\";\n\nimport LogoImage from \"./LogoImage\";\n\nconst Logo: React.FCC<{ "
  },
  {
    "path": "apps/web/components/Logo/LogoImage.tsx",
    "chars": 829,
    "preview": "import { cn } from \"@/lib/utils/common\";\n\nconst LogoImage: React.FCC<{\n  className?: string;\n}> = ({ className }) => {\n "
  },
  {
    "path": "apps/web/components/Logo/index.ts",
    "chars": 34,
    "preview": "export { default } from \"./Logo\";\n"
  },
  {
    "path": "apps/web/components/WorkInProgress.tsx",
    "chars": 849,
    "preview": "import { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nimport { faBarsProgress } from \"@fortawesome/free-sol"
  },
  {
    "path": "apps/web/components/layout/NavBar/index.tsx",
    "chars": 18357,
    "preview": "\"use client\";\n\nimport { Dialog, Menu, Transition } from \"@headlessui/react\";\nimport { ChevronDownIcon } from \"@heroicons"
  },
  {
    "path": "apps/web/components/ui/Container.tsx",
    "chars": 255,
    "preview": "import { cn } from \"@/lib/utils/common\";\n\nconst Container: React.FCC<{ className?: string }> = ({\n  children,\n  classNam"
  },
  {
    "path": "apps/web/components/ui/Heading.tsx",
    "chars": 1782,
    "preview": "import classNames from \"clsx\";\n\ntype HeadingType = 1 | 2 | 3 | 4 | 5 | 6;\n\nconst Heading: React.FCC<{ type?: HeadingType"
  },
  {
    "path": "apps/web/components/ui/If.tsx",
    "chars": 685,
    "preview": "import { Fragment, useMemo } from \"react\";\n\ntype Condition<Value = unknown> = Value | Falsy;\n\nfunction If<Value = unknow"
  },
  {
    "path": "apps/web/components/ui/Spinner.tsx",
    "chars": 1621,
    "preview": "import classNames from \"clsx\";\n\nfunction Spinner(\n  props: React.PropsWithChildren<{\n    className?: string;\n  }>,\n) {\n "
  },
  {
    "path": "apps/web/components/ui/Tile.tsx",
    "chars": 2881,
    "preview": "import {\n  ArrowSmallDownIcon,\n  ArrowSmallUpIcon,\n  Bars2Icon,\n} from \"@heroicons/react/24/outline\";\nimport { useMemo }"
  },
  {
    "path": "apps/web/components/ui/alert.tsx",
    "chars": 1617,
    "preview": "import { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \""
  },
  {
    "path": "apps/web/components/ui/button.tsx",
    "chars": 3296,
    "preview": "import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport L"
  },
  {
    "path": "apps/web/components/ui/calendar.tsx",
    "chars": 2910,
    "preview": "\"use client\";\n\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@radix-ui/react-icons\";\nimport * as React from \"react\""
  },
  {
    "path": "apps/web/components/ui/form.tsx",
    "chars": 4159,
    "preview": "import * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport * as React "
  },
  {
    "path": "apps/web/components/ui/input.tsx",
    "chars": 816,
    "preview": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils/common\";\n\nexport interface InputProps\n  extends React.I"
  },
  {
    "path": "apps/web/components/ui/label.tsx",
    "chars": 741,
    "preview": "\"use client\";\n\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-va"
  },
  {
    "path": "apps/web/components/ui/popover.tsx",
    "chars": 1324,
    "preview": "\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport * as React from \"react\";\n\nimport { cn"
  },
  {
    "path": "apps/web/components/ui/radio-group.tsx",
    "chars": 1459,
    "preview": "\"use client\";\n\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-"
  },
  {
    "path": "apps/web/components/ui/select.tsx",
    "chars": 5687,
    "preview": "\"use client\";\n\nimport {\n  CaretSortIcon,\n  CheckIcon,\n  ChevronDownIcon,\n  ChevronUpIcon,\n} from \"@radix-ui/react-icons\""
  },
  {
    "path": "apps/web/components/ui/switch.tsx",
    "chars": 1178,
    "preview": "\"use client\";\n\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\nimport * as React from \"react\";\n\nimport { cn "
  },
  {
    "path": "apps/web/components/ui/table.tsx",
    "chars": 2889,
    "preview": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils/common\";\n\nconst Table = React.forwardRef<\n  HTMLTableEl"
  },
  {
    "path": "apps/web/components/ui/textarea.tsx",
    "chars": 747,
    "preview": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils/common\";\n\nexport interface TextareaProps\n  extends Reac"
  },
  {
    "path": "apps/web/components.json",
    "chars": 348,
    "preview": "{\n  \"$schema\": \"https://ui.shadcn.com/schema.json\",\n  \"style\": \"new-york\",\n  \"rsc\": true,\n  \"tsx\": true,\n  \"tailwind\": {"
  },
  {
    "path": "apps/web/content/community-digest-summer-edition.mdx",
    "chars": 3956,
    "preview": "---\ntitle: 'Community Digest: Summer Edition'\npublishedAt: '2020-07-09'\nsummary: 'In this post, you will learn how to de"
  },
  {
    "path": "apps/web/content/create-and-deploy-a-blog-with-simple.mdx",
    "chars": 3961,
    "preview": "---\ntitle: 'Create and Deploy a blog with Simple'\npublishedAt: '2020-07-20'\nsummary: 'In this post, you will learn how t"
  },
  {
    "path": "apps/web/content/getting-started-with-nextjs.mdx",
    "chars": 3952,
    "preview": "---\ntitle: 'Getting started with Next.js'\npublishedAt: '2020-07-19'\nsummary: 'In this post, you will learn how to deploy"
  },
  {
    "path": "apps/web/content/getting-started-with-vuejs-and-stripe.mdx",
    "chars": 3961,
    "preview": "---\ntitle: 'Getting started with Vue.js and Stripe'\npublishedAt: '2020-07-15'\nsummary: 'In this post, you will learn how"
  },
  {
    "path": "apps/web/content/how-to-identify-high-intent-leads.mdx",
    "chars": 3955,
    "preview": "---\ntitle: 'How to identify high-intent leads'\npublishedAt: '2020-07-18'\nsummary: 'In this post, you will learn how to d"
  },
  {
    "path": "apps/web/content/how-to-work-with-friendly-apis.mdx",
    "chars": 3954,
    "preview": "---\ntitle: 'How to work with friendly APIs'\npublishedAt: '2020-07-14'\nsummary: 'In this post, you will learn how to depl"
  },
  {
    "path": "apps/web/content/introducing-the-testing-field-guide.mdx",
    "chars": 3958,
    "preview": "---\ntitle: 'Introducing the Testing Field Guide'\npublishedAt: '2020-07-12'\nsummary: 'In this post, you will learn how to"
  },
  {
    "path": "apps/web/content/why-we-think-simple-is-good-for-developers.mdx",
    "chars": 3967,
    "preview": "---\ntitle: 'Why we think Simple is good for developers'\npublishedAt: '2020-07-17'\nsummary: 'In this post, you will learn"
  },
  {
    "path": "apps/web/contentlayer.config.js",
    "chars": 824,
    "preview": "import { defineDocumentType, makeSource } from \"contentlayer/source-files\";\nimport rehypeSlug from \"rehype-slug\";\n\nconst"
  },
  {
    "path": "apps/web/core/constants/configs.ts",
    "chars": 1619,
    "preview": "const isProduction = process.env.NODE_ENV === \"production\";\n\nexport const configuration = {\n  site: {\n    name: \"Captabl"
  },
  {
    "path": "apps/web/core/prisma.ts",
    "chars": 90,
    "preview": "import { PrismaClient } from \"@prisma/client\";\n\nexport const prisma = new PrismaClient();\n"
  },
  {
    "path": "apps/web/core/types/common.type.ts",
    "chars": 309,
    "preview": "export type ObjectString = Record<string, string>;\n\nexport type ValueOf<T> = T[keyof T];\n\nexport type ServerPageProps<Pa"
  },
  {
    "path": "apps/web/global.d.ts",
    "chars": 854,
    "preview": "declare global {\n  type StringObject = Record<string, string>;\n  type NumberObject = Record<string, number>;\n  type Unkn"
  },
  {
    "path": "apps/web/lib/server/session.ts",
    "chars": 644,
    "preview": "import { nextAuthOptions } from \"@/app/api/auth/[...nextauth]/options\";\nimport { HttpStatusCode } from \"axios\";\nimport {"
  },
  {
    "path": "apps/web/lib/utils/common.ts",
    "chars": 330,
    "preview": "import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: C"
  },
  {
    "path": "apps/web/next.config.js",
    "chars": 168,
    "preview": "const { withContentlayer } = require('next-contentlayer')\n\n/** @type {import('next').NextConfig} */\nconst nextConfig = {"
  },
  {
    "path": "apps/web/package.json",
    "chars": 2296,
    "preview": "{\n  \"name\": \"cap.octolane.com\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"concurrently --kill-"
  },
  {
    "path": "apps/web/postcss.config.js",
    "chars": 140,
    "preview": "module.exports = {\n  plugins: {\n    \"postcss-import\": {},\n    \"tailwindcss/nesting\": {},\n    tailwindcss: {},\n    autopr"
  },
  {
    "path": "apps/web/prisma/migrations/20240110170446_nextauth_schema/migration.sql",
    "chars": 2241,
    "preview": "-- CreateTable\nCREATE TABLE \"User\" (\n    \"id\" TEXT NOT NULL,\n    \"name\" TEXT,\n    \"email\" TEXT,\n    \"emailVerified\" TIME"
  },
  {
    "path": "apps/web/prisma/migrations/20240110175417_basic_captable/migration.sql",
    "chars": 2285,
    "preview": "/*\n  Warnings:\n\n  - Added the required column `companyId` to the `User` table without a default value. This is not possi"
  },
  {
    "path": "apps/web/prisma/migrations/20240111041700_remove_relation_mode/migration.sql",
    "chars": 1758,
    "preview": "-- AddForeignKey\nALTER TABLE \"User\" ADD CONSTRAINT \"User_companyId_fkey\" FOREIGN KEY (\"companyId\") REFERENCES \"Company\"("
  },
  {
    "path": "apps/web/prisma/migrations/20240111055724_remove_company_as_notnullable_from_user_table/migration.sql",
    "chars": 315,
    "preview": "-- DropForeignKey\nALTER TABLE \"User\" DROP CONSTRAINT \"User_companyId_fkey\";\n\n-- AlterTable\nALTER TABLE \"User\" ALTER COLU"
  },
  {
    "path": "apps/web/prisma/migrations/migration_lock.toml",
    "chars": 126,
    "preview": "# Please do not edit this file manually\n# It should be added in your version-control system (i.e. Git)\nprovider = \"postg"
  },
  {
    "path": "apps/web/prisma/schema.prisma",
    "chars": 3911,
    "preview": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator clien"
  },
  {
    "path": "apps/web/tailwind.config.js",
    "chars": 2314,
    "preview": "const { fontFamily } = require(\"tailwindcss/defaultTheme\");\n\n/** @type {import('tailwindcss').Config} */\nmodule.exports "
  },
  {
    "path": "apps/web/tsconfig.json",
    "chars": 771,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"lib\": [\"dom\", \"dom.iterable\", \"esnext\"],\n    \"allowJs\": true,\n    \"sk"
  },
  {
    "path": "docker-compose.yml",
    "chars": 368,
    "preview": "version: \"3.7\"\nname: octolane-cap-table\n\nservices:\n  db:\n    image: postgres:16-alpine\n    container_name: postgres\n    "
  },
  {
    "path": "package.json",
    "chars": 1094,
    "preview": "{\n  \"name\": \"octolane-cap-monorepo\",\n  \"version\": \"1.0.0\",\n  \"scripts\": {\n    \"build\": \"turbo build\",\n    \"dev\": \"turbo "
  },
  {
    "path": "pnpm-workspace.yaml",
    "chars": 23,
    "preview": "packages:\n  - \"apps/*\"\n"
  },
  {
    "path": "turbo.json",
    "chars": 386,
    "preview": "{\n  \"$schema\": \"https://turbo.build/schema.json\",\n  \"globalDependencies\": [\n    \"**/.env\"\n  ],\n  \"pipeline\": {\n    \"buil"
  }
]

About this extraction

This page contains the full source code of the octolane-org/cap.octolane.com GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 125 files (241.4 KB), approximately 62.3k tokens, and a symbol index with 89 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!