tap-sketch

所属分类:前端开发
开发工具:Python
文件大小:1648KB
下载次数:0
上传日期:2021-04-05 16:18:24
上 传 者sh-1993
说明:  在Python Flask和React上运行的全堆栈web应用程序以社交媒体功能和交互式画布为中心...
(Full stack web app running on Python/Flask and React centered around social media features and an interactive canvas to create custom artwork.)

文件列表:
.dockerignore (65, 2021-04-06)
.env.example (180, 2021-04-06)
.flaskenv (13, 2021-04-06)
.vscode (0, 2021-04-06)
.vscode\settings.json (186, 2021-04-06)
Dockerfile (594, 2021-04-06)
Pipfile (717, 2021-04-06)
Pipfile.lock (24171, 2021-04-06)
app (0, 2021-04-06)
app\__init__.py (2323, 2021-04-06)
app\api (0, 2021-04-06)
app\api\auth_routes.py (2401, 2021-04-06)
app\api\comment_routes.py (1351, 2021-04-06)
app\api\drawing_routes.py (2803, 2021-04-06)
app\api\user_routes.py (1857, 2021-04-06)
app\config.py (185, 2021-04-06)
app\forms (0, 2021-04-06)
app\forms\__init__.py (69, 2021-04-06)
app\forms\login_form.py (981, 2021-04-06)
app\forms\signup_form.py (637, 2021-04-06)
app\models (0, 2021-04-06)
app\models\__init__.py (139, 2021-04-06)
app\models\comment.py (990, 2021-04-06)
app\models\db.py (58, 2021-04-06)
app\models\drawing.py (1207, 2021-04-06)
app\models\drawing_like.py (388, 2021-04-06)
app\models\follow.py (558, 2021-04-06)
app\models\user.py (1813, 2021-04-06)
app\seeds (0, 2021-04-06)
app\seeds\__init__.py (460, 2021-04-06)
app\seeds\users.py (596, 2021-04-06)
dev-requirements.txt (23, 2021-04-06)
migrations (0, 2021-04-06)
migrations\alembic.ini (829, 2021-04-06)
migrations\env.py (2916, 2021-04-06)
migrations\script.py.mako (494, 2021-04-06)
... ...

# Tap Sketch Tap Sketch is a full stack web application where budding artists can come together, create their own simple artworks, and share them with the community! To see it in action, please click [here](http://tap-sketch.herokuapp.com/)! ## Features Users can tap into a fully interactive HTML Canvas element to create their very own artworks from scratch!

Users can head over to their friends' profile pages and begin following one another to keep track of one another's latest artworks!

Once users have built up a good selection of artists to follow, they can head over to their home page to get a feed of their followed users' latest artworks.

## Installing this App 1. Clone this repository ```bash git clone https://github.com/darabandev/tap-sketch.git ``` 2. Install dependencies ```bash pipenv install --dev -r dev-requirements.txt && pipenv install -r requirements.txt ``` 3. Create a **.env** file based on the example with proper settings for your development environment 4. Setup your PostgreSQL user, password and database and make sure it matches your **.env** file 5. Get into your pipenv, migrate your database, seed your database, and run your flask app ```bash pipenv shell ``` ```bash flask db upgrade ``` ```bash flask seed all ``` ```bash flask run ``` 6. To run the React App in development, checkout the [README](./react-app/README.md) inside the `react-app` directory. --- _IMPORTANT!_ If you add any python dependencies to your pipfiles, you'll need to regenerate your requirements.txt before deployment. You can do this by running: ```bash pipenv lock -r > requirements.txt ``` _ALSO IMPORTANT!_ psycopg2-binary MUST remain a dev dependency because you can't install it on apline-linux. There is a layer in the Dockerfile that will install psycopg2 (not binary) for us. --- ## Deploy to Heroku 1. Create a new project on Heroku 2. Under Resources click "Find more add-ons" and add the add on called "Heroku Postgres" 3. Install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-command-line) 4. Run ```bash heroku login ``` 5. Login to the heroku container registry ```bash heroku container:login ``` 6. Update the `REACT_APP_BASE_URL` variable in the Dockerfile. This should be the full URL of your Heroku app: i.e. "https://flask-react-aa.herokuapp.com" 7. If you're running WSL1, scroll to the bottom of this readme for proper steps. Push your docker container to heroku from the root directory of your project. This will build the dockerfile and push the image to your heroku container registry ```bash heroku container:push web -a {NAME_OF_HEROKU_APP} ``` 8. Release your docker container to heroku ```bash heroku container:release web -a {NAME_OF_HEROKU_APP} ``` 9. set up your database: ```bash heroku run -a {NAME_OF_HEROKU_APP} flask db upgrade heroku run -a {NAME_OF_HEROKU_APP} flask seed all ``` 10. Under Settings find "Config Vars" and add any additional/secret .env variables. 11. profit --- ### WSL1 heroku push through powershell: If you have docker installed in your powershell and not in your wsl terminal, the following replace step 7 in the deploy section of your project readme “Deploy to Heroku” section: 7a. cd into the root of your app in your powershell and build the image from the Dockerfile with a specific tag! (IF YOU ARE DEPLOYING FOR THE SECOND TIME, you must delete the older version of this image with `docker image rm registry.heroku.com//web` before you build) `docker build --tag registry.heroku.com//web .` 7b. Push that newly built image to heroku: `docker push registry.heroku.com//web` Continue with step 8 in the readme

近期下载者

相关文件


收藏者