Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjj committed May 20, 2015
0 parents commit e11a2e6
Show file tree
Hide file tree
Showing 150 changed files with 9,469 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.idea
tmp/*
log/*
.dockerignore
53 changes: 53 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
node_modules/
bin/
build/
develop-eggs/
dist/
eggs/
parts/
sdist/
var/
npm-debug.log
*.egg-info/
.installed.cfg
*.egg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
.coverage
.cache

# Translations
*.mo

# Sphinx documentation
docs/_build/

# OS and editor files
.DS_Store
*/**.DS_Store
._*
.*.sw*
*~
.idea/
.mr.developer.cfg
.project
.pydevproject
*.tmproj
*.tmproject
tmtags

# App ignores.
instance/
celerybeat-schedule
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
language: 'python'
python: '2.7'

before_install:
- 'pip install pyflakes'

install:
- 'pip install --editable .'

script:
- 'flake8 .'
3 changes: 3 additions & 0 deletions .virtualenv-bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Helpers to auto-load the venv, this could be hooked up to PyCharm, etc..
source ~/.bashrc
source ~/.virtualenvs/catwatch/bin/activate
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Version 0.0.1 (2015-05-20)
^^^^^^^^^^^^^^^^^^^^^^^^^^

- Initial release
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To be determined. For now, assume there's no license.
4 changes: 4 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docker: docker-compose up
assets: npm start
web: PYTHONUNBUFFERED=true gunicorn -b localhost:8000 --reload "catwatch.app:create_app()"
worker: celery worker -A catwatch.blueprints.user.tasks -l info -B
88 changes: 88 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
|Build status|

What is this project?
^^^^^^^^^^^^^^^^^^^^^

This is the source code for the **Build a SAAS app with Flask** project. It is
currently on Kickstarter. Join me in making an awesome community resource:

https://www.kickstarter.com/projects/nickjj/build-a-saas-app-with-flask-and-deploy-it-with-doc

Want to donate but can't use Kickstarter?
'''''''''''''''''''''''''''''''''''''''''

|Flattr this git repo|

Installation instructions
^^^^^^^^^^^^^^^^^^^^^^^^^

This process will be more streamlined in the future but for now you're on your
own for setting up virtualenv and installing Docker.

Install Virtualenv
''''''''''''''''''
https://virtualenv.pypa.io/en/latest/installation.html

Install Docker
''''''''''''''
https://docs.docker.com/installation

I installed everything, now what?
'''''''''''''''''''''''''''''''''

- Clone this repo ``git clone https://github.com/nick/build-a-saas-app-with-flask``
- Type ``cd build-a-saas-app-with-flask``
- Activate your virtualenv
- Type ``pip install --editable .`` to activate the CLI
- Type ``run`` to see a list of what's available
- Type ``docker-compose up`` to start Postgres/Redis
- Type ``run db reset`` to initialize the database
- Type ``run all`` to start everything
- Visit http://localhost:8000 in your browser
- If you wish to login, email: ``dev@localhost.com``, password: ``password``

What's the workflow after I do the above at least once?
-------------------------------------------------------

- Activate your virtualenv
- Type ``run all`` to start everything
- Visit http://localhost:8000 in your browser

How do I shut everything down?
------------------------------

- Hit CTRL+C a few times to stop everything
- Type ``docker-compose stop`` to ensure all containers are stopped

High level overview
^^^^^^^^^^^^^^^^^^^

What packages are being used?
'''''''''''''''''''''''''''''

Check the commented ``requirements.txt`` for package specifics.

How will the project be managed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Upcoming features
'''''''''''''''''

I'm an organized person but not OCD about it. I will do my best to add pending
features to the issue tracker with a specific label. Not all features will get
added to the issue tracker because who wants to write issues all day!

Branches
''''''''

The latest "unstable but might be stable" version will be master.

Stable releases will be tagged and released using the http://semver.org/ system.
However early on in the project there's a very good chance the versions will
not adhere to semver perfectly.

.. |Build status| image:: https://secure.travis-ci.org/nickjj/build-saas-app-with-flask.png
:target: https://travis-ci.org/nickjj/build-saas-app-with-flask

.. |Flattr this git repo| image:: http://api.flattr.com/button/flattr-badge-large.png
:target: https://flattr.com/submit/auto?user_id=nickjj&url=https://github.com/nickjj/build-a-saas-app-with-flask&title=Build+a+SAAS+app+with+Flask&language=Python&tags=github&category=software
65 changes: 65 additions & 0 deletions alembic.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# A generic, single database configuration.

[alembic]
# path to migration scripts
script_location = migrations

# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s

# max length of characters to apply to the
# "slug" field
#truncate_slug_length = 40

# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false

# set to 'true' to allow .pyc and .pyo files without
# a source .py file to be detected as revisions in the
# versions/ directory
# sourceless = false

# version location specification; this defaults
# to migrations/versions. When using multiple version
# directories, initial revisions must be specified with --version-path
# version_locations = %(here)s/bar %(here)s/bat migrations/versions

# the output encoding used when revision files
# are written from script.py.mako
# output_encoding = utf-8

# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = WARN
handlers = console
qualname =

[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine

[logger_alembic]
level = INFO
handlers =
qualname = alembic

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
3 changes: 3 additions & 0 deletions babel.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[python: **.py]
[jinja2: **/templates/**.html]
extensions=jinja2.ext.autoescape,jinja2.ext.with_
Empty file added catwatch/__init__.py
Empty file.
Loading

0 comments on commit e11a2e6

Please sign in to comment.