Code Monkey home page Code Monkey logo

ulita_ui's Introduction

Basic boilerpate Register, Login and Logout. Python Backend and Vue.js Frontend

A SPA app with frontend made using Vue.js and backend in Python 3.8. This app has only 3 functions

  • Register - A component to register a new user
  • Login - A component to authenticate and generate a JWT for the user session
  • Logout - To invalidate the user session.

Documentation

A more detailed documentation can be found here: https://medium.com/@andrelbaldo/register-login-and-logout-boilerplate-written-in-vue-js-and-python-as-api-5ce57e33774b?source=friends_link&sk=4cdaa222f96dc4bd3a3a75eecf9eab97

Slack chanel

Join on our slack chanel: https://python-vue.slack.com/
Special thanks to Alex for creating it.

Getting Started

Clone the repository

git clone https://github.com/andrebaldo/python-vue-spa-boilerplate.git

Prerequisites

Installing

The installation is made in two steps, Backend and Frontend.

Database

If you don't have an SQL Server instance in your local machine you can install it downloading the "Microsoft SQL Server Express" or change the python file to point to a existing instance.

Copy the config.template.json file and name it to config.json, then edit the connection string accordingly with your database, here is an example for Microsoft SQL Server.

{
  "database_connection_string": "mssql://localhost/myDatabase?trusted_connection=yes&driver=SQL Server Native Client 11.0"
}

localhost: The computer address where the database is listening
myDatabase: The name of the database you want to use in this project
driver: The driver used to talk to the database server

Backend

Before you install the python dependencies you need to install the virtualenv and activate it, in order to do it please execute these commands one by one in a new command prompt window (cmd).

cd python-vue-spa-boilerplate\backend
pip install virtualenv
virtualenv venv
cd venv\Scripts\
activate
cd ..
cd ..

Using the same command prompt, go to the backend folder (if you are not in there yet) and run the pip install requirements.txt command

pip install -r ./requirements.txt

Once the pip have installed all the dependencies you need to create the database structure, to do it there is python script that does it for you, just execute this command:

python databaseCreation.py

If you didn't get any error, you can run the backend API using this command below:

python app.py

You can check if the API is running accessign the address http://localhost:5000/home you should receive Unauthorized message, if you got it the API is runing.

Now let us start the Frontend

Frontend

Open a new command prompt and go to the frontend folder.

cd python-vue-spa-boilerplate\frontend
npm i
yarn serve

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

ulita_ui's People

Contributors

andrebaldo avatar byalexcod avatar

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.