FlowForm is a form-processing service that lets you collect, manage, and securely store form submissions. Designed for flexibility, FlowForm can be used as a self-hosted solution or as a convenient, pre-hosted service, making it easy to connect your website forms with a single URL.
- Designs: View on Figma
- Workflow (Simple): View on Miro
- Easy Integration: Seamlessly connect forms from your website to FlowForm with minimal setup.
- Data Persistence: Store form submissions securely in PostgreSQL using Prisma ORM.
- User Authentication: Supports Google OAuth2 and local login for managing access.
- Session Management: Persistent sessions using PostgreSQL, ensuring security and convenience.
- RESTful API: Access and manage forms, projects, and users through a structured API.
- Swagger API Documentation: Full API documentation for easy reference and testing.
- Node.js and npm
- PostgreSQL for data storage
- Environment variables configured in a
.envfile:DATABASE_URL: Connection string for PostgreSQLSESSION_SECRET: Secret key for session managementGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET: For Google OAuth
-
Clone the repository and navigate to the server folder:
git clone https://github.com/yourusername/FlowForm.git cd FlowForm/server -
Install dependencies:
npm install
-
Set up the database using Prisma:
npx prisma migrate dev --name init
-
Start the server:
npm start
Your server should now be running on http://localhost:3000.
-
Navigate to the client folder:
cd ../client -
Install dependencies:
npm install
-
Start the client:
npm start
Your client should now be running on http://localhost:3001.
FlowForm supports both Google OAuth and local login for user authentication.
- Google OAuth: Authenticate users with their Google accounts.
- Local Login: Register and log in users with an email and password.
- POST /auth/login: Log in with email and password.
- POST /auth/signup: Register a new user.
- GET /auth/google: Redirect to Google for authentication.
- GET /auth/google/callback: Google OAuth callback.
- GET /auth/logout: Log out the current user.
- POST /forms: Create a new form associated with a project.
- GET /forms: Retrieve all forms.
- GET /forms/{id}: Retrieve a specific form by ID.
- PUT /forms/{id}: Update a form by ID.
- DELETE /forms/{id}: Delete a form by ID.
- POST /projects: Create a new project.
- GET /projects: Retrieve all projects.
- GET /projects/{id}: Retrieve a specific project by ID.
- PUT /projects/{id}: Update a project by ID.
- DELETE /projects/{id}: Delete a project by ID.
FlowForm uses session-based authentication and stores data securely in PostgreSQL, ensuring that user data is only accessible to authorized users. Sessions are maintained securely using HTTP-only cookies and encrypted secrets.
To access the Swagger API documentation, start your server and go to:
http://localhost:3000/api-docs
- Register or Login: Register a new user or log in using Google or local credentials.
- Create a Project: Start by creating a project to organize forms.
- Add Forms: Create forms associated with projects to collect submissions.
- Retrieve and Manage Data: Use the API to retrieve, update, or delete projects and forms as needed.
We welcome contributions! Feel free to submit issues, fork the repository, and make pull requests.
This project is licensed under the MIT License.