Skip to content

Commit dc43d62

Browse files
author
Aleksandr
committed
v0.1.0
0 parents  commit dc43d62

File tree

143 files changed

+14514
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+14514
-0
lines changed

.env.dev

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
APP_ENV=dev
2+
APP_SECRET=64cb2d31571b2874e68a0003bba2bcff
3+
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"

.env.prod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
APP_ENV=prod
2+
APP_SECRET=64cb2d31571b2874e68a0003bba2bcff
3+
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"

.env.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# define your env variables for the test env here
2+
KERNEL_CLASS='App\Kernel'
3+
APP_SECRET='$ecretf0rt3st'
4+
SYMFONY_DEPRECATIONS_HELPER=999999
5+
PANTHER_APP_ENV=panther
6+
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/.env
2+
/.env.local
3+
/.env.local.php
4+
/.env.*.local
5+
/config/secrets/prod/prod.decrypt.private.php
6+
/public/bundles/
7+
/var/
8+
/vendor/
9+
/phpunit.xml
10+
.phpunit.result.cache
11+
.idea
12+
.phpunit.cache
13+
.vscode
14+
.DS_Store
15+
compose.override.yaml

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM dunglas/frankenphp
2+
3+
COPY . /app
4+
5+
RUN apt-get update && apt-get install -y git libicu-dev zip unzip
6+
7+
RUN apt-get install sqlite3 libsqlite3-dev
8+
9+
RUN docker-php-ext-install intl pdo_sqlite
10+
11+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
12+
13+
RUN composer install

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Aleksandr Shelestov
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# FlexForm - Lightweight Form Server
2+
3+
## Introduction
4+
5+
Welcome to FlexForm, a fully open-source, headless form server designed with simplicity, efficiency, and privacy in mind. Built to be easily installed on any budget-friendly hosting solution or free cloud tiers, FlexForm is the perfect choice for developers and businesses looking for a reliable and GDPR-compliant form management solution.
6+
7+
<img src="./public/images/screen.png" width="100%">
8+
9+
## Features
10+
11+
- **Headless Architecture**: FlexForm is built as a headless server, offering flexibility and ease of integration with various frontend systems.
12+
- **Robust Admin Panel**: Manage your forms with ease using our user-friendly admin panel, designed for efficient and intuitive form management.
13+
- **Cost-Effective**: Designed to run smoothly on inexpensive hosting or free cloud services, reducing your operational costs.
14+
- **GDPR Compliant**: We prioritize your data privacy. FlexForm ensures that all your data remains yours, complying fully with GDPR regulations.
15+
- **Open Source**: Dive into the code, customize, and contribute! Our community-driven approach means FlexForm is continually evolving.
16+
17+
## License
18+
19+
FlexForm is released under MIT, ensuring it remains free and open for use and modification.
20+
21+
## Getting Started
22+
23+
### How to run locally with docker
24+
Checkout the repository jump to the folder and run the following commands:
25+
```bash
26+
docker-compose up
27+
```
28+
29+
### How to run locally without docker
30+
Make sure you have PHP 8.2 and composer installed.
31+
Checkout the repository jump to the folder.
32+
Copy environment file and adjust it to your needs:
33+
```bash
34+
cp .env.dev .env
35+
```
36+
Install dependencies:
37+
```bash
38+
composer install
39+
```
40+
Run the server:
41+
```bash
42+
php -S localhost:8000 -t public
43+
```
44+
45+
### How to install on shared hosting
46+
Build the project on your local machine or download prebuild release from [here](https://flexform.dev/downloads/flexform-server-latest.zip).
47+
Upload the files to your shared hosting.
48+
49+
Make sure you:
50+
- Set the environment variable `APP_ENV` to `prod` in your `.env` file. See [.env.prod](.env.prod) for an example.
51+
52+
### Deploy on cloud hosting
53+
You can deploy FlexForm on any cloud hosting provider that supports PHP 8.2 or higher.
54+
Also you can use our Dockerfile to deploy FlexForm on any cloud hosting provider that supports docker.
55+
56+
Make sure you:
57+
- Set the environment variable `APP_ENV` to `prod`
58+
- Set the environment variable `APP_SECRET` to a random string
59+
- Set the environment variable `DATABASE_URL` to your database connection string
60+
61+
You can see an example of environment variables in the [.env.prod](.env.prod) file.
62+
63+
## Frontend components
64+
FlexForm is a headless form server. This means that you can use any frontend framework to build your forms.
65+
We provide a set of frontend components that you can use to build your forms.
66+
67+
Soon will be available components for React, Vue, Angular, Svelte and more.
68+
69+
Stay in touch with us on [Twitter](https://twitter.com/flexformdev) to get the latest updates.

bin/console

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use App\Kernel;
5+
use Symfony\Bundle\FrameworkBundle\Console\Application;
6+
7+
if (!is_file(dirname(__DIR__) . '/vendor/autoload_runtime.php')) {
8+
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
9+
}
10+
11+
require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
12+
13+
return function (array $context) {
14+
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
15+
16+
return new Application($kernel);
17+
};

bin/phpunit

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
if (!ini_get('date.timezone')) {
5+
ini_set('date.timezone', 'UTC');
6+
}
7+
8+
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
9+
if (PHP_VERSION_ID >= 80000) {
10+
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
11+
} else {
12+
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
13+
require PHPUNIT_COMPOSER_INSTALL;
14+
}
15+
} else {
16+
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
17+
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
18+
exit(1);
19+
}
20+
21+
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
22+
}

composer.json

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"type": "project",
3+
"license": "proprietary",
4+
"minimum-stability": "stable",
5+
"prefer-stable": true,
6+
"require": {
7+
"php": ">=8.2",
8+
"ext-ctype": "*",
9+
"ext-iconv": "*",
10+
"doctrine/doctrine-bundle": "^2.11",
11+
"doctrine/doctrine-migrations-bundle": "^3.3",
12+
"doctrine/orm": "^2.17",
13+
"phpoffice/phpspreadsheet": "^1.29",
14+
"symfony/console": "7.0.*",
15+
"symfony/dotenv": "7.0.*",
16+
"symfony/flex": "^2",
17+
"symfony/form": "7.0.*",
18+
"symfony/framework-bundle": "7.0.*",
19+
"symfony/password-hasher": "7.0.*",
20+
"symfony/runtime": "7.0.*",
21+
"symfony/security-bundle": "7.0.*",
22+
"symfony/twig-bundle": "7.0.*",
23+
"symfony/validator": "7.0.*",
24+
"symfony/yaml": "7.0.*",
25+
"twig/extra-bundle": "^2.12|^3.0",
26+
"twig/twig": "^2.12|^3.0"
27+
},
28+
"require-dev": {
29+
"phpunit/phpunit": "^10.5",
30+
"symfony/maker-bundle": "^1.52",
31+
"symfony/phpunit-bridge": "^7.0"
32+
},
33+
"config": {
34+
"allow-plugins": {
35+
"php-http/discovery": true,
36+
"symfony/flex": true,
37+
"symfony/runtime": true
38+
},
39+
"sort-packages": true
40+
},
41+
"autoload": {
42+
"psr-4": {
43+
"App\\": "src/"
44+
}
45+
},
46+
"autoload-dev": {
47+
"psr-4": {
48+
"App\\Tests\\": "tests/"
49+
}
50+
},
51+
"replace": {
52+
"symfony/polyfill-ctype": "*",
53+
"symfony/polyfill-iconv": "*",
54+
"symfony/polyfill-php72": "*",
55+
"symfony/polyfill-php73": "*",
56+
"symfony/polyfill-php74": "*",
57+
"symfony/polyfill-php80": "*",
58+
"symfony/polyfill-php81": "*",
59+
"symfony/polyfill-php82": "*"
60+
},
61+
"scripts": {
62+
"auto-scripts": {
63+
"cache:clear": "symfony-cmd",
64+
"assets:install %PUBLIC_DIR%": "symfony-cmd",
65+
"doctrine:migrations:migrate": "symfony-cmd"
66+
},
67+
"post-install-cmd": [
68+
"@auto-scripts"
69+
],
70+
"post-update-cmd": [
71+
"@auto-scripts"
72+
]
73+
},
74+
"conflict": {
75+
"symfony/symfony": "*"
76+
},
77+
"extra": {
78+
"symfony": {
79+
"allow-contrib": false,
80+
"require": "7.0.*"
81+
}
82+
}
83+
}

0 commit comments

Comments
 (0)