Local Development

Local Development

This document provides step-by-step instructions for setting up a local development environment for contributing to Formzillion using the PNPM package manager. By following these guidelines, you will be able to run Formzillion on your machine and make code contributions.

Prerequisites

Before you begin, ensure that you have the following prerequisites installed on your system:

  1. NodeJs: Formzillion requires Node.js follow the instruction to install NodeJs (opens in a new tab).

  2. PNPM: Formzillion uses PNPM as package manager. Follow the instructions To install PNPM (opens in a new tab).

  3. Git: Git is used for version control. Install Git by following the instructions for your operating system: Git (opens in a new tab).

  4. Redis: Formzillion uses Redis for run workflow actions. Follow the instructions to install Redis (opens in a new tab).

  5. Supabase: Formzillion uses Supabase for authentication. Follow the instructions to install Supabase (opens in a new tab).

Getting the Source Code

To start contributing to Formzillion, you need to fork the project's repository on GitHub and clone it to your local machine. Follow these steps to get the source code:

  1. Visit the Formzillion repository on GitHub: formzillion.com (opens in a new tab).

  2. Click the "Fork (opens in a new tab)" button in the top-right corner of the repository page. This will create a copy of the repository under your GitHub account.

  3. Once the forking process is complete, you will be redirected to your forked repository on GitHub. Copy the URL of your forked repository.

  4. Open a terminal or command prompt.

  5. Navigate to the directory where you want to store the Formzillion project.

  6. Run the following command to clone your forked repository:

    git clone <forked-repository-url>

    Replace <forked-repository-url> with the URL you copied in step 3.

  7. Once the repository is cloned, navigate into the project directory:

    cd formzillion.com

Setting Up the Development Environment

After cloning the repository, you need to set up the development environment. Follow these steps to configure the necessary dependencies:

  • Install project dependencies by running the following command:

    pnpm install

Packages Setup

These are the supporting packages for running Formzillion.

Database: Formzillion uses Prisma ORM for database access.

  1. Navigate to packages -> database directory. By running following command.
cd packages/database/
  1. Create a .env file with the following content:
  DATABASE_URL=postgresql://postgres:postgres@localhost:54322/postgres
  1. Now Run the following commands to setup the database:
pnpm install
npx prisma migrate deploy # Only Once
npx prisma generate

Ref: Prisma CLI Docs (opens in a new tab)

Env Setup for Individual Apps

Website: consists of website app for Formzillion. to contribute under this to the following.

Create a .env file with the following contents in apps/website:

  NEXT_PUBLIC_APP_URL=http://localhost:3000

Note: Website run on the port no: 4000.

Running Formzillion Locally

With the development environment set up, you can now run Formzillion on your local machine. Follow these steps to start the server:

  1. Open a terminal or command prompt.

  2. Navigate to the project directory if you are not already there.

  3. Run the following command to start the development server:

    pnpm run dev
  4. All applications should now be operational on your local machine at the specified address..

    AppAddress
    Websitehttp://localhost:4000 (opens in a new tab)
    Webapphttp://localhost:3000 (opens in a new tab)
    Docshttp://localhost:3001 (opens in a new tab)
    WorkerBackend

Making Code Contributions

To contribute code to Formzillion, follow these guidelines:

  1. Create a new branch for your changes. You can do this using the following Git command:

    git checkout -b feature/my-new-feature

    Replace feature/my-new-feature with a descriptive branch name that reflects the purpose of your changes.

  2. Make the necessary code changes in your preferred code editor.

  3. Commit your changes using Git:

    git commit -m "Add a descriptive commit message"

    Provide a clear and concise commit message that summarizes your changes.

  4. Push your branch to the remote repository:

    git push origin feature/my-new-feature
  5. Finally, open a pull request on the Formzillion repository on GitHub. Describe your changes, provide any relevant information, and submit the pull request for review.

Congratulations! You have successfully set up your local development environment for Formzillion.

Remember, every contribution, no matter how big or small, makes a difference. Your code, documentation, bug reports, feature suggestions, and feedback are all incredibly valuable. Together, we will build Formzillion into a remarkable platform that simplifies form management for users worldwide.