Giter Site home page Giter Site logo

saakshi-singhal / flask-angular-to-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikhailbeliy1/flask-angular

0.0 0.0 0.0 4.07 MB

Angular admin page with Flask backend

JavaScript 0.31% Python 2.65% TypeScript 64.70% CSS 11.48% HTML 20.86%

flask-angular-to-react's Introduction

Python Flask Starter Bundle Instructions

Description

This project is admin page which built with Flask and Angular 8

Running Instructions

Application requires a database to correctly run. It can be any database SQLAlchemy supports. In development by default Sqlite database is used, which is stored at api/bundle.db. If you would like to use other database in development mode, change database URL in api/config.py line 46.

Running the backend

  1. Install python 3. You can find here instructions for your operation system.

  2. Change directory to the backend folder cd backend

  3. Create virtualenv virtualenv -p python3 bundle_env

  4. Activate virtualenv source bundle_env/bin/activate

  5. Install required python modules pip install -r requirements.txt

  6. Only during the initial launch create database schema for your application python manage.py recreate_db

  7. Run the application python manage.py runserver

That's it! Now your application is running at port 3001 and you can access it by typing http://localhost:3001/ in your browser.

Running Angular front end

Before running Angular you need to have node installed

  1. Install nodejs. You can download it using you operating system package manager or from here.

  2. Go to the front end folder cd frontend

  3. Run commands npm install and npm start

  4. Open http://localhost:4200 in your browser

  5. create new user using interface and start working with app

Other Commands

# development
$ npm run start
# development with watch mode - code will be rebuild after each change. it runs `nodemon` module to watch over changes and re-run node api automatically. 
$ npm run start:dev
# build dist for prod deployment
$ npm run build
# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov

Style Check

# lint
$ npm run lint

Features

  • Flask framework, feature based modules
  • Compatible with ngx-admin out of the box
  • JWT authentication using flask-jwt-extended module
  • PostgreSQL, MySQL, Oracle, Microsoft SQL Server, and SQLite can be used as databases
  • SQLAlchemy is used as database toolkit for data CRUD operations
  • Compression setup for API
  • Logging to constole and files
  • werkzeug is used for better experience while develop
  • 6 months free updates

Basic Code Structure

Code is organized in following structure

  • Main Folder
    • frontend // this folder contains all UI code
    • backend // server side Flask code
      • api // this is where all project files located
        • auth // auth module and code there
        • user // user module and code there
        • __init__.py // this is where flask app is created
        • config.py // configuration reading code is here
        • core.py // general module independent code
        • db.py // database initialization
        • email.py // code that sends emails
      • email.py // application runner
    • README.md

flask-angular-to-react's People

Contributors

mikhailbeliy1 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.