Kwerio
Enterprise Modular SAAS Framework, Design from the growndup to grow vertically.
Explore the docs »
View Demo · Report Bug · Request Feature
Table of Contents
About The Project
Built With
Getting Started
Prerequisites
You need to have docker installed in order to start developing using kwerio.
Installation
- Run kwerio
$ cp .env.example .env
$ make
- Migrate the system database
$ make app.exec
(app) $ php artisan migrate --path database/migrations/system --database system
(app) $ php artisan migrate --database system
(app) $ php artisan db:seed --database system
(app) $ php artisan module:enable Home --group Home
(app) $ exit
$ make app.hot
Usage
Host Configuration
- Use
dnsmasq
to be able to use dynamic subdomains, which is required for using kwerio to develop modules for multiple tenants.
If you are only going to develop modules for a single tenant, then you can skip
dnsmasq
configuration, and simply use/etc/hosts
.
# file: /etc/dnsmasq.conf
# ------------------------------------------------ [ Custom DNS Servers ] -- #
server=1.1.1.1
server=1.0.0.1
# --------------------------------------------------------- [ .test TLD ] -- #
address=/.test/127.0.0.1
# file: /etc/resolv.conf
nameserver 127.0.0.1
$ sudo systemctl restart dnsmasq.service
$ sudo chattr +i /etc/resolv.conf
- use
mkcert
oropenssl
to generate a wildcard certificate.
$ cd ~/.local/share/mkcert
$ mkcert *.kwerio.test
- use the following
httpd
configuration forreverse proxy
andwstunnel
# file: httpd.conf
# Modules: mod_rewrite
# --------------------------------------- [ Host: _wildcard.kwerio.test ] -- #
<VirtualHost *:80>
ServerName kwerio.test
ServerAlias *.kwerio.test
RewritEengine On
RewriteCond %{HTTP_HOST} ^(.+)\.kwerio\.test$
RewriteRule ^(.*)$ https://%1.kwerio.test$1 [R=permanent,L]
RewriteCond %{SERVER_NAME} =*.kwerio.test
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
VirtualHost>
# file: httpd-ssl.conf
# Modules: mod_rewrite, mod_headers, mod_ssl
# --------------------------------------- [ Host: _wildcard.kwerio.test ] -- #
<VirtualHost *:443>
ServerAlias *.kwerio.test
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteCond %{HTTP:Connection} =upgrade [NC]
RewriteRule (.*) ws://172.20.0.10:80$1 [P,L]
ProxyPreserveHost On
ProxyPass / http://172.20.0.10/
ProxyPassReverse / http://172.20.10/
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
SSLCertificateFile /etc/ssl/_wildcard.kwerio.test.crt
SSLCertificateKeyFile /etc/ssl/_wildcard.kwerio.test.key
VirtualHost>
[ Optional ] If you are using httpd
docker image, then append the previous configuration to files httpd.conf
and httpd-ssl.conf
and use the following docker-compose
configuration
don't forget to change
/home/oussama/.local/share/mkcert
with the path to where you installed your certificates.
version: "3.9"
services:
apache2:
image: httpd:2.4.51-alpine3.14
restart: unless-stopped
networks:
kwerio:
ipv4_address: 172.20.0.100
tty: true
stdin_open: true
ports:
- 127.0.0.1:80:80
- 127.0.0.1:443:433
volumes:
- ./httpd.conf:/usr/local/apache2/conf/httpd.conf
- ./httpd-ssl.conf:/usr/local/apache2/conf/extra/httpd-ssl.conf
- /home/oussama/.local/share/mkcert/_wildcard.kwerio.test.pem:/etc/ssl/_wildcard.kwerio.test.crt
- /home/oussama/.local/share/mkcert/_wildcard.kwerio.test-key.pem:/etc/ssl/_wildcard.kwerio.test.key
networks:
kwerio:
external: true
Run the container
$ docker-compose up \
--build \
--abort-on-container-exit \
--remove-orphans
Running kwerio
After you configure your host to run kwerio,
The first time you access kwerio you will be redirected to the login page, use the login email
and password
defined in .env
file to enter kwerio.
[email protected]
ROOT_USER_PASSWORD=ohdaTh0jou5zei2Ga4neeY9Hichae3vo
$ https://ohphief6.kwerio.test
If you enabled the Home
module during installation, then you will be able to see the dashboard, otherwise you will receive a 403 because you don't have access to any module.
Roadmap
Checklist for v1.0
- User Managements.
- Group / User permissions and abilities.
- Tenants can share or have unique access to modules.
- Tenants can host there own database.
- Add api support.
- Tenants can use there own domain.
- Chat with other members (work together).
- Have video conferences for work.
- Latest activities as notification by all other members.
- Online Visibility, time spent working.
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - 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 MIT License. See LICENSE.md
for more information.
Contact
Oussama Elgoumri - Telegram - @Euvoor
Project Link: https://github.com/kwerio/kwerio