High-level python framework that facilitates rapid server-side development with clean & pragmatic design!
The MIC stack genesis!
Proton is a high-level Python framework that facilitates rapid server-side development with clean & pragmatic design. Thanks for checking it out!
signup
& login
with necessaary validations.git clone https://github.com/1x-eng/PROTON.git & Change directory
cd ~/PROTON/`./cproton.sh -U yes
, please comply to CLI prompts(Use absolute address; not relative for file paths)http://localhost:3000
.Signup
and Login
./signup
route to sign up users to platform.
db
by changing db_flavor
in POST payload. Supports sqlite
& postgresql
.signup
and login
validation for free. For example - What happens if
someone tries to signup with the same email / username?
token
post successful login - That one command to setup the platform has prepared JWT Token
Authentication with minimum dev effort.localhost:3000/proton-grafana
in your
favourite browser and login with default credentials:
Proton Monitor
Proton Stack - Holistic Monitor
Proton facilitates rapid API development (the Model Interface Controller stack) with templated code generated by a few CLI commands.
Why do we need this despite many zillion frameworks? Potentially, to help get away from some of these boring tasks:
Generate new API (you can do all CRUD ops on that API) by this one command ./cproton.sh -n myNewApi
get
route, post
route and concurrency
route.db_flavour
of your POST JSON
payload to sqlite
.For every new MIC stack that you create (via cproton.sh -s <your_api_name>
), Proton generates a dedicated controller (to drive CRUD ops):
Deploy using ./cproton.sh -s yes
id
as a query parameter and results comply to this query parameter.Deleting made easy, while separating concerns.
login
and signup
routes remain unaffected. Similarly, if there were other MIC stacks and you destroyed one of them,
all others remain as is; unaffected.Access logs here - ./PROTON/trace
OpenAPI specs out-of-the-box
Proton also ships with an ability to backup vitals (secrets + db volume mounts) to cold storage (Dropbox)
To initiate backup,
backup
folder in Proton home directory../scripts/proton_backup_orchestrator.sh
cat
those reports available under backup/reports
folder.Similar to backups, Proton also ships with ability to restore from remote dropbox location to your local machine or remote server.
In order to initiate restoration, ensure you have the access token handy for your remote backup folder and navigate to backup
folder.
./scripts/proton_restore.sh
./deployer.sh -d <your_dns>
./deployer.sh -a yes
./deployer.sh -r yes
sudo apt-get update
sudo apt-get install -y docker
sudo apt-get install -y docker-compose
sudo groupadd -e docker
sudo gpasswd -a ${USER} docker
newgrp docker
sudo apt-get update
sudo apt-get install -y nginx
unlink /etc/nginx/sites-enabled/default
cd /etc/nginx/sites-available
cat <<EOT > reverse-proxy.conf
server {
listen 80;
listen [::]:80;
server_name <dns here>;
access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;
location / {
proxy_pass http://127.0.0.1:3000;
}
}
EOT
ln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf
sudo nginx -t
sudo service nginx restart
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:certbot/certbot -y
sudo apt-get update
sudo apt-get install -y python-certbot-nginx
sudo certbot --nginx --non-interactive --agree-tos -m <email> -d <dns eg. temp.com here>
cd ~/PROTON
sudo chmod 777 -R ./
./cproton.sh -U yes
PROTON is a product of Adroit Software Corporation (ABN 426 3819 0066) (https://adroitcorp.com.au)
BSD 3-Clause License
Copyright (c) 2018, Pruthvi Kumar & Adroit Software Corporation (https://www.adroitcorp.com.au) All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.