* fixes committed conflict in README * adds a devcontainer based on compose includes mailhog and postgres containers * adds launch.json for nextjs vscode quick actions * mentions devcontainer in the readme * auto prisma migration after creating devcontainer * remote containers as recommended vscode extension * adds nextauth url env to dev container - to show correct links in mails when testing locally Co-authored-by: Niklas Paulsen <npau@informatik.uni-kiel.de> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
6.7 KiB
snoopForms
Finally, good open-source forms!
Website & Hosted version | Join Discord community
⚠️ Note: This repository is still in an early stage of development. We love the open source community and want to show what we are working on early. We will update this readme with more information once it is safe to use. Until then, feel free to share your thoughts, contact us, and contribute if you'd like.
About snoopForms
Spin up forms in minutes. Pipe your data exactly where you need it. Maximize your results with juicy analytics.
What is snoopForms?
With snoopForms you can build complex multi-page forms in minutes using either our built-in No Code Builder or our React library. All form submissions are automatically sent to the snoopForms platform for processing and analysis. You can view the submission within the platform or you can easily configure pipelines to send your data to other systems, services or databases.
Features
- React Lib & No Code Builder to build & integrate forms rapidly.
- 100% compliant with all privacy regulations (self-hosted).
- (next) Put your data to work with integrations.
- (next) Juicy analytics out of the box.
- (always) smooth Developer Experience comes first.
Built With
Getting started
you can develop in a VS Code dev container or using any editor/IDE with local tool installation.
Getting started using VS Code dev container
You need
- Docker, e.g. Docker Desktop
- VS Code with the extension Remote - Containers (
ms-vscode-remote.remote-containers)
Either use the command Open Folder in Container... in the cloned repo, or use Remote Containers: Clone Repository in Container Volume..., for example to inspect a PR.
The dev container comes with
- Node.JS, yarn etc pre-installed
- a
postgrescontainer and environment variables preset to reach it, - a
mailhogcontainer that acts as a mock SMTP server and shows received mails in a web UI (forwarded to your host'slocalhost:8025)
upon start, it executes the yarn install and yarn prisma migrate dev automatically once.
When your dev container is ready, you can simply hit F5 to start the application in debug mode.
Getting started using local development setup
To get the project running locally on your machine you need to have the following development tools installed:
- Node.JS (we recommend v16)
- Yarn
- PostgreSQL
- Clone the project:
git clone https://github.com/snoopForms/snoopforms.git && cd snoopforms
- Install Node.JS packages via yarn. Don't have yarn? Use
npm install --global yarn.
yarn install
- Make sure you have a running database instance, e.g. by using docker. A quick and dirty instance can be spun up via:
docker run --name snoopformsDB -p 5432:5432 -e POSTGRES_USER=snoopforms -e POSTGRES_PASSWORD=password -e POSTGRES_DB=snoopforms -d postgres
- Create a
.envfile based on.env.exampleand change it according to your setup. Make sure theDATABASE_URLvariable is set correctly according to your local database.
cp .env.example .env
For the example above, use the following:
DATABASE_URL='postgresql://snoopforms:password@localhost:5432/snoopforms?schema=public'
-
Use the code editor of your choice to edit the .env file. You need to change all fields according to your setup.
-
Make sure your PostgreSQL Database Server is running. Then let prisma set up the database for you:
yarn prisma migrate dev
- Start the development server:
yarn dev
You can now access the app on https://localhost:3000. You will be automatically redirected to the login. To use your local installation of snoopForms, create a new account.
Deployment
The easiest way to deploy the snoopHub on your own machine is using Docker. This requires Docker and the docker compose plugin on your system to work.
Clone the repository:
git clone https://github.com/snoopForms/snoopforms.git && cd snoopforms
Create a .env file based on .env.example and change all fields according to your setup. The SMTP-credentials are essential for verification emails to work during user signup.
cp .env.example .env && nano .env
Start the docker compose process to build and spin up the snoopForms container as well as the postgres database.
docker compose up -d
# (use docker-compose if you are on an older docker version)
You can now access the app on https://localhost:3000. You will be automatically redirected to the login. To use your local installation of snoopForms, create a new account.
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Make your changes
- Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
License
Distributed under the AGPLv3 License. See LICENSE for more information.