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:
-
NodeJs: Formzillion requires Node.js follow the instruction to install NodeJs (opens in a new tab).
-
PNPM: Formzillion uses PNPM as package manager. Follow the instructions To install PNPM (opens in a new tab).
-
Git: Git is used for version control. Install Git by following the instructions for your operating system: Git (opens in a new tab).
-
Redis: Formzillion uses Redis for run workflow actions. Follow the instructions to install Redis (opens in a new tab).
-
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:
-
Visit the Formzillion repository on GitHub: formzillion.com (opens in a new tab).
-
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.
-
Once the forking process is complete, you will be redirected to your forked repository on GitHub. Copy the URL of your forked repository.
-
Open a terminal or command prompt.
-
Navigate to the directory where you want to store the Formzillion project.
-
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. -
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.
- Navigate to packages -> database directory. By running following command.
cd packages/database/
- Create a .env file with the following content:
DATABASE_URL=postgresql://postgres:postgres@localhost:54322/postgres
- Now Run the following commands to setup the database:
pnpm install
npx prisma migrate deploy # Only Once
npx prisma generate
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:
-
Open a terminal or command prompt.
-
Navigate to the project directory if you are not already there.
-
Run the following command to start the development server:
pnpm run dev
-
All applications should now be operational on your local machine at the specified address..
App Address Website http://localhost:4000 (opens in a new tab) Webapp http://localhost:3000 (opens in a new tab) Docs http://localhost:3001 (opens in a new tab) Worker Backend
Making Code Contributions
To contribute code to Formzillion, follow these guidelines:
-
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. -
Make the necessary code changes in your preferred code editor.
-
Commit your changes using Git:
git commit -m "Add a descriptive commit message"
Provide a clear and concise commit message that summarizes your changes.
-
Push your branch to the remote repository:
git push origin feature/my-new-feature
-
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.