GithubHelp home page GithubHelp logo

saasforge / open-source-saas-boilerpate Goto Github PK

View Code? Open in Web Editor NEW
788.0 788.0 113.0 12.89 MB

Free SaaS boilerplate (Python/PostgreSQL/ReactJS/Webpack)

Home Page: https://www.saasforge.dev

License: MIT License

Python 26.59% Batchfile 0.16% Shell 0.11% JavaScript 61.13% CSS 0.15% HTML 1.60% Dockerfile 0.27% SCSS 9.98%
boilerplate dashboard flask free-saas jwt python python3 reactjs saas-boilerpate

open-source-saas-boilerpate's People

Contributors

mandrews avatar saasforge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-source-saas-boilerpate's Issues

Docker?

Hey, it would be really awesome if you added some Dockerfiles so people don't need to install dependencies.

Wrong jsonpath imported in src/app/dashboard/DashboardShell.jsx

import jsonpath from 'jsonPath';

should be

import jsonpath from 'jsonpath';

otherwise receiving error during npm run dev

npm -v 5.8.0
ubuntu 19.10

ERROR in ./src/app/dashboard/DashboardShell.jsx
Module not found: Error: Can't resolve 'jsonPath' in '/saasForge/src/app/dashboard'
resolve 'jsonPath' in '/saasForge/src/app/dashboard'
  Parsed request is a module
  using description file: /saasForge/package.json (relative path: ./src/app/dashboard)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /saasForge/src/app/dashboard/node_modules doesn't exist or is not a directory
      /saasForge/src/app/node_modules doesn't exist or is not a directory
      /saasForge/src/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /saasForge/node_modules
        using description file: /saasForge/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /saasForge/package.json (relative path: ./node_modules/jsonPath)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /saasForge/node_modules/jsonPath doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /saasForge/node_modules/jsonPath.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /saasForge/node_modules/jsonPath.jsx doesn't exist
            .css
              Field 'browser' doesn't contain a valid alias configuration
              /saasForge/node_modules/jsonPath.css doesn't exist
            as directory
              /saasForge/node_modules/jsonPath doesn't exist
[/saasForge/src/app/dashboard/node_modules]
[/saasForge/src/app/node_modules]
[/saasForge/src/node_modules]
[/node_modules]
[/node_modules]
[/saasForge/node_modules/jsonPath]
[/saasForge/node_modules/jsonPath.js]
[/saasForge/node_modules/jsonPath.jsx]
[/saasForge/node_modules/jsonPath.css]
 @ ./src/app/dashboard/DashboardShell.jsx 17:0-32 116:18-26
 @ ./src/app/dashboard/DashboardApp.jsx
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] dev: `webpack --config webpack.dev.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/s13ecre13t/.npm/_logs/2019-12-19T22_21_54_502Z-debug.log

Docker-compose with mounted repo not working properly

Hello,

First of all, very nice work here ! Thanks for sharing your work to the world.

I just cloned your repo and used docker-compose to run the app locally but i got a blank page on http://localhost:5000/auth/login. In the developer console it shown a 404 on http://localhost:5000/static/dist/auth.bundle.js

The reason is if you do not run the

npm install --global npm && \
    npm update && \
    npm install && \
    npm run dev

on your local and mount the repo in /app with your compose file, the generated js etc.. will not be there.

A quick fix would be to comment or delete the volume mount as below because you do it in the Dockerfile:

 app:
    build: .
    depends_on:
      - db
    environment:
      - FLASK_APP=${FLASK_APP:-application}
      - FLASK_ENV=${FLASK_ENV:-dev}
      - FLASK_RUN_HOST=${FLASK_RUN_HOST:-0.0.0.0}
      - jwt_secret_key=${jwt_secret_key:-FAKE_JWT_SECRET_KEY}
      - secret_key=${secret_key:-FAKE_SECRET_KEY}
      - db_url=postgres://postgres:password@db:5432/dev
    ports:
      - 5000:5000
    # volumes:
    #   - .:/app

Another solution would be to add the npm stuff in the entrypoint.sh, so it will generate everything at runtime even if you mount the repo. With this solution it will work every time, but with 1 min overhead at starting the app container.

I don't know, you know that better than me for sure !

[Feature Request] Teams/Companies and RBAC

Hi there,

Have you considered moving permissions to the principle of a company and multiple users being a member of that company in the capacity of a given role.

For example Joe is the 'owner' of company 1 and company 2, Jane is a manager in company 1, Josie is an accounts person who needs billing only access to company 2. The owner can assign roles to users within that company. The company can be renamed ect.

[Feature Request] Extending Features

Hi

thanks for sharing this boilerplate, I gets the job done pretty easily.
I believe, a nice-to-have addition would be the support for OpenAPI, maybe through the usage of the generator.

Another one would be move all the parts into docker containers.

flask dbcreate fails

trying to run flask dbcreate fails

cd /saasForge/
flask dbcreate

Usage: flask [OPTIONS] COMMAND [ARGS]...
Try "flask --help" for help.

Error: No such command "dbcreate".

flask --version

Flask 1.0.2
Python 3.7.5 (default, Nov 20 2019, 09:21:52)
[GCC 9.2.1 20191008]

ubuntu 19.10

docker-compose up fails

Error: Cannot find module '/app/webpack.dev.js'

Happens because webpack.dev.js and webpack.common.js are not copied before the npm command. Need to fix the dockerfile.

Email with AWS SES throws "Invalid Mail From address" error

Hello,
I am trying to demo the application, but I cannot get the email registration to work. I am trying to have the app send emails using my AWS SES account, which I can get working in python with the flask_mail module.

from flask import Flask
from flask_mail import Message
from flask_mail import Mail

app = Flask(name)
app.config.update(dict(
MAIL_DEBUG = True,
MAIL_SERVER = 'email-smtp.us-west-2.amazonaws.com',
MAIL_PORT = 587,
MAIL_USE_TLS = True,
MAIL_USE_SSL = False,
MAIL_USERNAME = 'MYUSERNAME',
MAIL_PASSWORD = 'MYPASSWORD',
ADMIN_EMAIL='[email protected]',
MAIL_DEFAULT_SENDER='[email protected]'
))

mail = Mail(app)
msg = Message('test subject', sender='[email protected]', recipients=['[email protected]'])
msg.body = 'Yes, it works now."

with app.app_context():
mail.send(msg)

Using the above config and code I can get the email sent to my personal gmail account that I am using to register on the SaaSForge boilerplate Please Register page.

I am using the exact same config for my SasSForge Boilerplate .env file, but when I attempt to create my account on the Please Register page, I get the errors about invalid MAIL FROM posted below.

Note that for SES the username and password are strings that are not a traditional [email protected] email address - maybe this is related? Again, when i use the regular flask_mail module I don't have any issue and it logs in the same way.

Any idea how to fix this error so I can register and test the app?

127.0.0.1 - - [21/Oct/2020 23:49:39] "GET /auth/finishregister/c9e75c30-81cc-41b6-84fc-673f7b334ffe96e HTTP/1.1" 200 -
send: 'ehlo 161.133.158.192.in-addr.arpa\r\n'
reply: b'250-email-smtp.amazonaws.com\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-SIZE 1048573360\r\n'
reply: b'250-STARTTLS\r\n'
reply: b'250-AUTH PLAIN LOGIN\r\n'
reply: b'250 Ok\r\n'
reply: retcode (250); Msg: b'email-smtp.amazonaws.com#$\nSIZE #$\nSTARTTLS\nAUTH PLAIN LOGIN\nOk'
send: 'STARTTLS\r\n'
reply: b'220 Ready to start TLS\r\n'
reply: retcode (220); Msg: b'Ready to start TLS'
send: 'ehlo 161.133.458.192.in-addr.arpa\r\n'
reply: b'250-email-smtp.amazonaws.com\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-SIZE 10485760\r\n'
reply: b'250-STARTTLS\r\n'
reply: b'250-AUTH PLAIN LOGIN\r\n'
reply: b'250 Ok\r\n'
reply: retcode (250); Msg: b'email-smtp.amazonaws.com\n844BITMIME\nSIZE 10483345760\nSTARTTLS\nAUTH PLAIN LOGIN\nOk'
send: 'AUTH PLAIN MYPASSWORD\r\n'
reply: b'235 Authentication successful.\r\n'
reply: retcode (235); Msg: b'Authentication successful.'
send: 'mail FROM: size=2542\r\n'
reply: b'501 Invalid MAIL FROM address provided\r\n'
reply: retcode (501); Msg: b'Invalid MAIL FROM address provided'
send: 'rset\r\n'
reply: b'250 Ok\r\n'
reply: retcode (250); Msg: b'Ok'
send: 'quit\r\n'
reply: b'221 Bye\r\n'
reply: retcode (221); Msg: b'Bye'
Exception in thread Thread-7:
Traceback (most recent call last):
File "/Users/me/git/open-source-saas-boilerpate/venv/lib/python3.8/site-packages/flask_mail.py", line 188, in send
self.host.sendmail(sanitize_address(envelope_from or message.sender),
File "/usr/local/Cellar/[email protected]/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/smtplib.py", line 871, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
smtplib.SMTPSenderRefused: (501, b'Invalid MAIL FROM address provided', '=?utf-8?q?Your_company_name?= MYUSERNAME')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.