From e487adcc97b8d2bd111a34b7d3c72d66001deb8b Mon Sep 17 00:00:00 2001 From: rr- Date: Fri, 1 Apr 2016 18:45:25 +0200 Subject: [PATCH] split files into client/ and server/ --- .gitignore | 5 +- INSTALL.md | 64 +++++++++++------- .jscsrc => client/.jscsrc | 0 scripts/build-frontend.js => client/build.js | 16 ++--- {static => client}/css/forms.css | 0 {static => client}/css/help.css | 0 {static => client}/css/home.css | 0 {static => client}/css/main.css | 0 {static => client}/css/users.css | 0 {static => client}/html/help-about.hbs | 0 {static => client}/html/help-comments.hbs | 0 {static => client}/html/help-keyboard.hbs | 0 {static => client}/html/help-search.hbs | 0 {static => client}/html/help-tos.hbs | 0 {static => client}/html/help.hbs | 0 {static => client}/html/home.hbs | 0 {static => client}/html/index.htm | 0 {static => client}/html/login.hbs | 0 {static => client}/html/top_nav.hbs | 0 {static => client}/html/user_registration.hbs | 0 {static => client/img}/favicon.png | Bin {static => client}/js/.gitignore | 0 {static => client}/js/api.js | 0 {static => client}/js/config.js | 0 .../js/controllers/auth_controller.js | 0 .../js/controllers/comments_controller.js | 0 .../js/controllers/help_controller.js | 0 .../js/controllers/history_controller.js | 0 .../js/controllers/home_controller.js | 0 .../js/controllers/posts_controller.js | 0 .../js/controllers/tags_controller.js | 0 .../js/controllers/top_nav_controller.js | 0 .../js/controllers/users_controller.js | 0 {static => client}/js/event_listener.js | 0 {static => client}/js/main.js | 0 {static => client}/js/util.js | 0 {static => client}/js/views/base_view.js | 0 {static => client}/js/views/help_view.js | 0 {static => client}/js/views/home_view.js | 0 {static => client}/js/views/login_view.js | 0 .../js/views/registration_view.js | 0 {static => client}/js/views/top_nav_view.js | 0 package.json => client/package.json | 4 +- {public => client/public}/.gitignore | 0 alembic.ini => server/alembic.ini | 0 {scripts => server}/host-waitress | 8 +-- requirements.txt => server/requirements.txt | 0 {szurubooru => server/szurubooru}/__init__.py | 0 .../szurubooru}/api/__init__.py | 0 .../szurubooru}/api/users.py | 0 {szurubooru => server/szurubooru}/app.py | 0 {szurubooru => server/szurubooru}/config.py | 4 +- .../szurubooru}/middleware/__init__.py | 0 .../szurubooru}/middleware/authenticator.py | 0 .../szurubooru}/middleware/db_session.py | 0 .../szurubooru}/middleware/json_translator.py | 0 .../szurubooru}/middleware/require_json.py | 0 .../szurubooru}/migrations/env.py | 0 .../szurubooru}/migrations/script.py.mako | 0 .../7032abdf6efd_make_login_time_nullable.py | 0 .../89ca368219b6_change_user_access_rank.py | 0 ...c2c9_add_unique_constraint_to_user_name.py | 0 .../e5c1216a8503_create_user_table.py | 0 .../szurubooru}/model/__init__.py | 0 .../szurubooru}/model/base.py | 0 .../szurubooru}/model/user.py | 0 .../szurubooru}/services/__init__.py | 0 .../szurubooru}/services/auth_service.py | 0 .../szurubooru}/services/errors.py | 0 .../szurubooru}/services/password_service.py | 0 .../szurubooru}/services/user_service.py | 0 {szurubooru => server/szurubooru}/util.py | 0 72 files changed, 55 insertions(+), 46 deletions(-) rename .jscsrc => client/.jscsrc (100%) rename scripts/build-frontend.js => client/build.js (87%) rename {static => client}/css/forms.css (100%) rename {static => client}/css/help.css (100%) rename {static => client}/css/home.css (100%) rename {static => client}/css/main.css (100%) rename {static => client}/css/users.css (100%) rename {static => client}/html/help-about.hbs (100%) rename {static => client}/html/help-comments.hbs (100%) rename {static => client}/html/help-keyboard.hbs (100%) rename {static => client}/html/help-search.hbs (100%) rename {static => client}/html/help-tos.hbs (100%) rename {static => client}/html/help.hbs (100%) rename {static => client}/html/home.hbs (100%) rename {static => client}/html/index.htm (100%) rename {static => client}/html/login.hbs (100%) rename {static => client}/html/top_nav.hbs (100%) rename {static => client}/html/user_registration.hbs (100%) rename {static => client/img}/favicon.png (100%) rename {static => client}/js/.gitignore (100%) rename {static => client}/js/api.js (100%) rename {static => client}/js/config.js (100%) rename {static => client}/js/controllers/auth_controller.js (100%) rename {static => client}/js/controllers/comments_controller.js (100%) rename {static => client}/js/controllers/help_controller.js (100%) rename {static => client}/js/controllers/history_controller.js (100%) rename {static => client}/js/controllers/home_controller.js (100%) rename {static => client}/js/controllers/posts_controller.js (100%) rename {static => client}/js/controllers/tags_controller.js (100%) rename {static => client}/js/controllers/top_nav_controller.js (100%) rename {static => client}/js/controllers/users_controller.js (100%) rename {static => client}/js/event_listener.js (100%) rename {static => client}/js/main.js (100%) rename {static => client}/js/util.js (100%) rename {static => client}/js/views/base_view.js (100%) rename {static => client}/js/views/help_view.js (100%) rename {static => client}/js/views/home_view.js (100%) rename {static => client}/js/views/login_view.js (100%) rename {static => client}/js/views/registration_view.js (100%) rename {static => client}/js/views/top_nav_view.js (100%) rename package.json => client/package.json (80%) rename {public => client/public}/.gitignore (100%) rename alembic.ini => server/alembic.ini (100%) rename {scripts => server}/host-waitress (68%) rename requirements.txt => server/requirements.txt (100%) rename {szurubooru => server/szurubooru}/__init__.py (100%) rename {szurubooru => server/szurubooru}/api/__init__.py (100%) rename {szurubooru => server/szurubooru}/api/users.py (100%) rename {szurubooru => server/szurubooru}/app.py (100%) rename {szurubooru => server/szurubooru}/config.py (92%) rename {szurubooru => server/szurubooru}/middleware/__init__.py (100%) rename {szurubooru => server/szurubooru}/middleware/authenticator.py (100%) rename {szurubooru => server/szurubooru}/middleware/db_session.py (100%) rename {szurubooru => server/szurubooru}/middleware/json_translator.py (100%) rename {szurubooru => server/szurubooru}/middleware/require_json.py (100%) rename {szurubooru => server/szurubooru}/migrations/env.py (100%) rename {szurubooru => server/szurubooru}/migrations/script.py.mako (100%) rename {szurubooru => server/szurubooru}/migrations/versions/7032abdf6efd_make_login_time_nullable.py (100%) rename {szurubooru => server/szurubooru}/migrations/versions/89ca368219b6_change_user_access_rank.py (100%) rename {szurubooru => server/szurubooru}/migrations/versions/d186d2e9c2c9_add_unique_constraint_to_user_name.py (100%) rename {szurubooru => server/szurubooru}/migrations/versions/e5c1216a8503_create_user_table.py (100%) rename {szurubooru => server/szurubooru}/model/__init__.py (100%) rename {szurubooru => server/szurubooru}/model/base.py (100%) rename {szurubooru => server/szurubooru}/model/user.py (100%) rename {szurubooru => server/szurubooru}/services/__init__.py (100%) rename {szurubooru => server/szurubooru}/services/auth_service.py (100%) rename {szurubooru => server/szurubooru}/services/errors.py (100%) rename {szurubooru => server/szurubooru}/services/password_service.py (100%) rename {szurubooru => server/szurubooru}/services/user_service.py (100%) rename {szurubooru => server/szurubooru}/util.py (100%) diff --git a/.gitignore b/.gitignore index 50817d1..378345b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ config.ini -node_modules - -# name used in INSTALL.md -python_modules +*/*_modules/ diff --git a/INSTALL.md b/INSTALL.md index 472d62f..3a99f4d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -39,12 +39,20 @@ user@host:~$ sudo -i -u postgres psql -c "ALTER USER szuru PASSWORD 'dog';" -### Installing soft dependencies +### Preparing environment + +Getting `szurubooru`: + +```console +user@host:~$ git clone https://github.com/rr-/szurubooru2 szuru +user@host:~$ cd szuru +``` Installing frontend dependencies: ```console -user@host:path/to/szurubooru$ npm install +user@host:szuru$ cd client +user@host:szuru/client$ npm install ``` `npm` sandboxes dependencies by default, i.e. installs them to @@ -54,35 +62,43 @@ project's dependencies. To make Python work the same way, we'll use this: ```console -user@host:path/to/szurubooru$ virtualenv python_modules # consistent with node_modules -user@host:path/to/szurubooru$ source python_modules/bin/activate # enters the sandbox -(python_modules) user@host:path/to/szurubooru$ pip install -r requirements.txt # installs the dependencies +user@host:szuru/client$ cd ../server +user@host:szuru/server$ virtualenv python_modules # consistent with node_modules +user@host:szuru/server$ source python_modules/bin/activate # enters the sandbox +(python_modules) user@host:szuru/server$ pip install -r requirements.txt # installs the dependencies ``` ### Preparing `szurubooru` for first run -Configure things: +1. Configure things: -```console -user@host:path/to/szurubooru$ cp config.ini.dist config.ini -user@host:path/to/szurubooru$ vim config.ini -``` + ```console + user@host:szuru$ cp config.ini.dist config.ini + user@host:szuru$ vim config.ini + ``` -Pay extra attention to the `[database]` and `[smtp]` sections, and API URL in -`[basic]`. + Pay extra attention to the `[database]` and `[smtp]` sections, and API URL in + `[basic]`. -Then update the database and compile the frontend: +2. Compile the frontend: -```console -user@host:path/to/szurubooru$ npm run build # compiles frontend -user@host:path/to/szurubooru$ source python_modules/bin/activate # enters python sandbox -(python_modules) user@host:path/to/szurubooru$ alembic update head # runs all DB upgrades -``` + ```console + user@host:szuru$ cd client + user@host:szuru/client$ npm run build + ``` -`alembic` should have been installed during installation of `szurubooru`'s -dependencies. +3. Upgrade the database: + + ```console + user@host:szuru/client$ cd ../server + user@host:szuru/server$ source python_modules/bin/activate + (python_modules) user@host:szuru/server$ alembic update head + ``` + + `alembic` should have been installed during installation of `szurubooru`'s + dependencies. It is recommended to rebuild the frontend after each change to configuration. @@ -99,9 +115,9 @@ Below are described the methods to integrate the API into a web server: 1. Run API locally with `waitress`, and bind it with a reverse proxy. In this approach, the user needs to (from within `virtualenv`) install `waitress` with `pip install waitress` and then start `szurubooru` with - `./scripts/host-waitress` (see `--help` for details). Then the user needs to + `./server/host-waitress` (see `--help` for details). Then the user needs to add a virtual host that delegates the API requests to the local API server, - and the browser requests to the `public/` directory. + and the browser requests to the `client/public/` directory. 2. Alternatively, Apache users can use `mod_wsgi`. 3. Alternatively, users can use other WSGI frontends such as `gunicorn` or `uwsgi`, but they'll need to write wrapper scripts themselves. @@ -126,7 +142,7 @@ server { proxy_pass http://127.0.0.1:6666/$1$is_args$args; } location / { - root /home/rr-/src/maintained/szurubooru/public; + root /home/rr-/src/maintained/szurubooru/client/public; try_files $uri /index.htm; } } @@ -139,5 +155,5 @@ server { api_url = http://big.dude/api/ ``` -Then the backend is started with `./scripts/host-waitress` from within +Then the backend is started with `./server/host-waitress` from within `virtualenv`. diff --git a/.jscsrc b/client/.jscsrc similarity index 100% rename from .jscsrc rename to client/.jscsrc diff --git a/scripts/build-frontend.js b/client/build.js similarity index 87% rename from scripts/build-frontend.js rename to client/build.js index fee4f4f..eb32e9b 100644 --- a/scripts/build-frontend.js +++ b/client/build.js @@ -25,10 +25,10 @@ function getConfig() { return result; } - let config = parseIniFile('./config.ini.dist'); + let config = parseIniFile('../config.ini.dist'); try { - const localConfig = parseIniFile('./config.ini'); + const localConfig = parseIniFile('../config.ini'); config = merge.recursive(config, localConfig); } catch (e) { console.warn('Local config does not exist, ignoring'); @@ -49,8 +49,8 @@ function getConfig() { function bundleHtml(config) { const minify = require('html-minifier').minify; - const baseHtml = fs.readFileSync('./static/html/index.htm', 'utf-8'); - glob('static/html/**/*.hbs', {}, (er, files) => { + const baseHtml = fs.readFileSync('./html/index.htm', 'utf-8'); + glob('./html/**/*.hbs', {}, (er, files) => { let templatesHtml = ''; for (const file of files) { templatesHtml += util.format( @@ -78,7 +78,7 @@ function bundleHtml(config) { function bundleCss() { const minify = require('csso').minify; - glob('static/css/**/*.css', {}, (er, files) => { + glob('./css/**/*.css', {}, (er, files) => { let css = ''; for (const file of files) { css += fs.readFileSync(file); @@ -91,7 +91,7 @@ function bundleCss() { function bundleJs() { const browserify = require('browserify'); const uglifyjs = require('uglify-js'); - glob('./static/js/**/*.js', {}, function(er, files) { + glob('./js/**/*.js', {}, function(er, files) { const outputFile = fs.createWriteStream('./public/bundle.min.js'); browserify().add(files).bundle().pipe(outputFile); outputFile.on('finish', function() { @@ -104,7 +104,7 @@ function bundleJs() { function bundleConfig(config) { fs.writeFileSync( - './static/js/.config.autogen.json', JSON.stringify(config)); + './js/.config.autogen.json', JSON.stringify(config)); } function copyFile(source, target) { @@ -116,4 +116,4 @@ bundleConfig(config); bundleHtml(config); bundleCss(); bundleJs(); -copyFile('static/favicon.png', 'public/favicon.png'); +copyFile('./img/favicon.png', './public/favicon.png'); diff --git a/static/css/forms.css b/client/css/forms.css similarity index 100% rename from static/css/forms.css rename to client/css/forms.css diff --git a/static/css/help.css b/client/css/help.css similarity index 100% rename from static/css/help.css rename to client/css/help.css diff --git a/static/css/home.css b/client/css/home.css similarity index 100% rename from static/css/home.css rename to client/css/home.css diff --git a/static/css/main.css b/client/css/main.css similarity index 100% rename from static/css/main.css rename to client/css/main.css diff --git a/static/css/users.css b/client/css/users.css similarity index 100% rename from static/css/users.css rename to client/css/users.css diff --git a/static/html/help-about.hbs b/client/html/help-about.hbs similarity index 100% rename from static/html/help-about.hbs rename to client/html/help-about.hbs diff --git a/static/html/help-comments.hbs b/client/html/help-comments.hbs similarity index 100% rename from static/html/help-comments.hbs rename to client/html/help-comments.hbs diff --git a/static/html/help-keyboard.hbs b/client/html/help-keyboard.hbs similarity index 100% rename from static/html/help-keyboard.hbs rename to client/html/help-keyboard.hbs diff --git a/static/html/help-search.hbs b/client/html/help-search.hbs similarity index 100% rename from static/html/help-search.hbs rename to client/html/help-search.hbs diff --git a/static/html/help-tos.hbs b/client/html/help-tos.hbs similarity index 100% rename from static/html/help-tos.hbs rename to client/html/help-tos.hbs diff --git a/static/html/help.hbs b/client/html/help.hbs similarity index 100% rename from static/html/help.hbs rename to client/html/help.hbs diff --git a/static/html/home.hbs b/client/html/home.hbs similarity index 100% rename from static/html/home.hbs rename to client/html/home.hbs diff --git a/static/html/index.htm b/client/html/index.htm similarity index 100% rename from static/html/index.htm rename to client/html/index.htm diff --git a/static/html/login.hbs b/client/html/login.hbs similarity index 100% rename from static/html/login.hbs rename to client/html/login.hbs diff --git a/static/html/top_nav.hbs b/client/html/top_nav.hbs similarity index 100% rename from static/html/top_nav.hbs rename to client/html/top_nav.hbs diff --git a/static/html/user_registration.hbs b/client/html/user_registration.hbs similarity index 100% rename from static/html/user_registration.hbs rename to client/html/user_registration.hbs diff --git a/static/favicon.png b/client/img/favicon.png similarity index 100% rename from static/favicon.png rename to client/img/favicon.png diff --git a/static/js/.gitignore b/client/js/.gitignore similarity index 100% rename from static/js/.gitignore rename to client/js/.gitignore diff --git a/static/js/api.js b/client/js/api.js similarity index 100% rename from static/js/api.js rename to client/js/api.js diff --git a/static/js/config.js b/client/js/config.js similarity index 100% rename from static/js/config.js rename to client/js/config.js diff --git a/static/js/controllers/auth_controller.js b/client/js/controllers/auth_controller.js similarity index 100% rename from static/js/controllers/auth_controller.js rename to client/js/controllers/auth_controller.js diff --git a/static/js/controllers/comments_controller.js b/client/js/controllers/comments_controller.js similarity index 100% rename from static/js/controllers/comments_controller.js rename to client/js/controllers/comments_controller.js diff --git a/static/js/controllers/help_controller.js b/client/js/controllers/help_controller.js similarity index 100% rename from static/js/controllers/help_controller.js rename to client/js/controllers/help_controller.js diff --git a/static/js/controllers/history_controller.js b/client/js/controllers/history_controller.js similarity index 100% rename from static/js/controllers/history_controller.js rename to client/js/controllers/history_controller.js diff --git a/static/js/controllers/home_controller.js b/client/js/controllers/home_controller.js similarity index 100% rename from static/js/controllers/home_controller.js rename to client/js/controllers/home_controller.js diff --git a/static/js/controllers/posts_controller.js b/client/js/controllers/posts_controller.js similarity index 100% rename from static/js/controllers/posts_controller.js rename to client/js/controllers/posts_controller.js diff --git a/static/js/controllers/tags_controller.js b/client/js/controllers/tags_controller.js similarity index 100% rename from static/js/controllers/tags_controller.js rename to client/js/controllers/tags_controller.js diff --git a/static/js/controllers/top_nav_controller.js b/client/js/controllers/top_nav_controller.js similarity index 100% rename from static/js/controllers/top_nav_controller.js rename to client/js/controllers/top_nav_controller.js diff --git a/static/js/controllers/users_controller.js b/client/js/controllers/users_controller.js similarity index 100% rename from static/js/controllers/users_controller.js rename to client/js/controllers/users_controller.js diff --git a/static/js/event_listener.js b/client/js/event_listener.js similarity index 100% rename from static/js/event_listener.js rename to client/js/event_listener.js diff --git a/static/js/main.js b/client/js/main.js similarity index 100% rename from static/js/main.js rename to client/js/main.js diff --git a/static/js/util.js b/client/js/util.js similarity index 100% rename from static/js/util.js rename to client/js/util.js diff --git a/static/js/views/base_view.js b/client/js/views/base_view.js similarity index 100% rename from static/js/views/base_view.js rename to client/js/views/base_view.js diff --git a/static/js/views/help_view.js b/client/js/views/help_view.js similarity index 100% rename from static/js/views/help_view.js rename to client/js/views/help_view.js diff --git a/static/js/views/home_view.js b/client/js/views/home_view.js similarity index 100% rename from static/js/views/home_view.js rename to client/js/views/home_view.js diff --git a/static/js/views/login_view.js b/client/js/views/login_view.js similarity index 100% rename from static/js/views/login_view.js rename to client/js/views/login_view.js diff --git a/static/js/views/registration_view.js b/client/js/views/registration_view.js similarity index 100% rename from static/js/views/registration_view.js rename to client/js/views/registration_view.js diff --git a/static/js/views/top_nav_view.js b/client/js/views/top_nav_view.js similarity index 100% rename from static/js/views/top_nav_view.js rename to client/js/views/top_nav_view.js diff --git a/package.json b/client/package.json similarity index 80% rename from package.json rename to client/package.json index edc5148..da59222 100644 --- a/package.json +++ b/client/package.json @@ -2,8 +2,8 @@ "name": "szurubooru", "private": true, "scripts": { - "build": "node scripts/build-frontend.js", - "watch": "watch 'npm run build' static --wait=0 --ignoreDotFiles" + "build": "node build.js", + "watch": "watch 'npm run build' html js css img --wait=0 --ignoreDotFiles" }, "dependencies": { "browserify": "^13.0.0", diff --git a/public/.gitignore b/client/public/.gitignore similarity index 100% rename from public/.gitignore rename to client/public/.gitignore diff --git a/alembic.ini b/server/alembic.ini similarity index 100% rename from alembic.ini rename to server/alembic.ini diff --git a/scripts/host-waitress b/server/host-waitress similarity index 68% rename from scripts/host-waitress rename to server/host-waitress index 3ea4dd3..c179858 100755 --- a/scripts/host-waitress +++ b/server/host-waitress @@ -10,17 +10,13 @@ import argparse import os.path import sys import waitress - -sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir)) from szurubooru.app import create_app def main(): parser = argparse.ArgumentParser('Starts szurubooru using waitress.') parser.add_argument( - '-p', '--port', - type=int, help='port to listen on', default=6666) - parser.add_argument( - '--host', help='IP to listen on', default='0.0.0.0') + '-p', '--port', type=int, help='port to listen on', default=6666) + parser.add_argument('--host', help='IP to listen on', default='0.0.0.0') args = parser.parse_args() app = create_app() diff --git a/requirements.txt b/server/requirements.txt similarity index 100% rename from requirements.txt rename to server/requirements.txt diff --git a/szurubooru/__init__.py b/server/szurubooru/__init__.py similarity index 100% rename from szurubooru/__init__.py rename to server/szurubooru/__init__.py diff --git a/szurubooru/api/__init__.py b/server/szurubooru/api/__init__.py similarity index 100% rename from szurubooru/api/__init__.py rename to server/szurubooru/api/__init__.py diff --git a/szurubooru/api/users.py b/server/szurubooru/api/users.py similarity index 100% rename from szurubooru/api/users.py rename to server/szurubooru/api/users.py diff --git a/szurubooru/app.py b/server/szurubooru/app.py similarity index 100% rename from szurubooru/app.py rename to server/szurubooru/app.py diff --git a/szurubooru/config.py b/server/szurubooru/config.py similarity index 92% rename from szurubooru/config.py rename to server/szurubooru/config.py index e973f9e..4b2827e 100644 --- a/szurubooru/config.py +++ b/server/szurubooru/config.py @@ -10,8 +10,8 @@ class ConfigurationError(RuntimeError): class Config(object): ''' INI config parser and container. ''' def __init__(self): - self.config = configobj.ConfigObj('config.ini.dist') - if os.path.exists('config.ini'): + self.config = configobj.ConfigObj('../config.ini.dist') + if os.path.exists('../config.ini'): self.config.merge(configobj.ConfigObj('config.ini')) self._validate() diff --git a/szurubooru/middleware/__init__.py b/server/szurubooru/middleware/__init__.py similarity index 100% rename from szurubooru/middleware/__init__.py rename to server/szurubooru/middleware/__init__.py diff --git a/szurubooru/middleware/authenticator.py b/server/szurubooru/middleware/authenticator.py similarity index 100% rename from szurubooru/middleware/authenticator.py rename to server/szurubooru/middleware/authenticator.py diff --git a/szurubooru/middleware/db_session.py b/server/szurubooru/middleware/db_session.py similarity index 100% rename from szurubooru/middleware/db_session.py rename to server/szurubooru/middleware/db_session.py diff --git a/szurubooru/middleware/json_translator.py b/server/szurubooru/middleware/json_translator.py similarity index 100% rename from szurubooru/middleware/json_translator.py rename to server/szurubooru/middleware/json_translator.py diff --git a/szurubooru/middleware/require_json.py b/server/szurubooru/middleware/require_json.py similarity index 100% rename from szurubooru/middleware/require_json.py rename to server/szurubooru/middleware/require_json.py diff --git a/szurubooru/migrations/env.py b/server/szurubooru/migrations/env.py similarity index 100% rename from szurubooru/migrations/env.py rename to server/szurubooru/migrations/env.py diff --git a/szurubooru/migrations/script.py.mako b/server/szurubooru/migrations/script.py.mako similarity index 100% rename from szurubooru/migrations/script.py.mako rename to server/szurubooru/migrations/script.py.mako diff --git a/szurubooru/migrations/versions/7032abdf6efd_make_login_time_nullable.py b/server/szurubooru/migrations/versions/7032abdf6efd_make_login_time_nullable.py similarity index 100% rename from szurubooru/migrations/versions/7032abdf6efd_make_login_time_nullable.py rename to server/szurubooru/migrations/versions/7032abdf6efd_make_login_time_nullable.py diff --git a/szurubooru/migrations/versions/89ca368219b6_change_user_access_rank.py b/server/szurubooru/migrations/versions/89ca368219b6_change_user_access_rank.py similarity index 100% rename from szurubooru/migrations/versions/89ca368219b6_change_user_access_rank.py rename to server/szurubooru/migrations/versions/89ca368219b6_change_user_access_rank.py diff --git a/szurubooru/migrations/versions/d186d2e9c2c9_add_unique_constraint_to_user_name.py b/server/szurubooru/migrations/versions/d186d2e9c2c9_add_unique_constraint_to_user_name.py similarity index 100% rename from szurubooru/migrations/versions/d186d2e9c2c9_add_unique_constraint_to_user_name.py rename to server/szurubooru/migrations/versions/d186d2e9c2c9_add_unique_constraint_to_user_name.py diff --git a/szurubooru/migrations/versions/e5c1216a8503_create_user_table.py b/server/szurubooru/migrations/versions/e5c1216a8503_create_user_table.py similarity index 100% rename from szurubooru/migrations/versions/e5c1216a8503_create_user_table.py rename to server/szurubooru/migrations/versions/e5c1216a8503_create_user_table.py diff --git a/szurubooru/model/__init__.py b/server/szurubooru/model/__init__.py similarity index 100% rename from szurubooru/model/__init__.py rename to server/szurubooru/model/__init__.py diff --git a/szurubooru/model/base.py b/server/szurubooru/model/base.py similarity index 100% rename from szurubooru/model/base.py rename to server/szurubooru/model/base.py diff --git a/szurubooru/model/user.py b/server/szurubooru/model/user.py similarity index 100% rename from szurubooru/model/user.py rename to server/szurubooru/model/user.py diff --git a/szurubooru/services/__init__.py b/server/szurubooru/services/__init__.py similarity index 100% rename from szurubooru/services/__init__.py rename to server/szurubooru/services/__init__.py diff --git a/szurubooru/services/auth_service.py b/server/szurubooru/services/auth_service.py similarity index 100% rename from szurubooru/services/auth_service.py rename to server/szurubooru/services/auth_service.py diff --git a/szurubooru/services/errors.py b/server/szurubooru/services/errors.py similarity index 100% rename from szurubooru/services/errors.py rename to server/szurubooru/services/errors.py diff --git a/szurubooru/services/password_service.py b/server/szurubooru/services/password_service.py similarity index 100% rename from szurubooru/services/password_service.py rename to server/szurubooru/services/password_service.py diff --git a/szurubooru/services/user_service.py b/server/szurubooru/services/user_service.py similarity index 100% rename from szurubooru/services/user_service.py rename to server/szurubooru/services/user_service.py diff --git a/szurubooru/util.py b/server/szurubooru/util.py similarity index 100% rename from szurubooru/util.py rename to server/szurubooru/util.py