Giter Site home page Giter Site logo

medyas / access-control-web-ui Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 12.64 MB

This web app is part of the access control app, which allow you to monitor the access logs of the employees/users, add user/employees and block them

Python 12.55% CSS 43.48% JavaScript 31.21% HTML 12.76%
website python raspberry-pi flask apache html css javascript jquery bootstrap mysql

access-control-web-ui's Introduction

Access-Control-Web-UI

This app is made to run in the Raspberry Pi, using Python and the Flask framework

This is part of the Access Control Desktop App, the app can be found in this Repo : Access Control Desktop App

install apache2 and mod_wsgi and follow this video to setup everything : https://www.youtube.com/watch?v=wq0saslschw

sudo apt-get install apache2
sudo apt-get install libapache2-mod-wsgi-py3

also, the full database is exported and was added to the desktop app repo, which you can import in the mysql with :

gunzip < [dataBase.sql.gz]  | mysql -u [user] -p[password] [databasename] 

create the users table in the database, and add users which will have acces to the web app

CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `firstname` varchar(30) NOT NULL,
  `lastname` varchar(30) NOT NULL,
  `username` varchar(30) NOT NULL,
  `email` varchar(30) NOT NULL,
  `password` varchar(50) NOT NULL,
  `edit_per` tinyint(1) NOT NULL,
  `add_per` tinyint(1) NOT NULL,
  `block_per` tinyint(1) NOT NULL,
  `delete_per` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) 

create the blocked employee database, which will include the employees from to blocked time

CREATE TABLE `blocked_employee` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `user_id` int(8) unsigned DEFAULT NULL,
  `block_start` datetime NOT NULL,
  `block_end` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ub_id` (`user_id`),
  CONSTRAINT `ub_id` FOREIGN KEY (`user_id`) REFERENCES `employees` (`id`)
) 

Then just eun the rfid.py file to start the Flask web server. python3 rfid.py open your localhost: http://localhost address in the browser and you should get the login page. either you add a user in the database(using the terminal) and login with it, or just use my old data: username: medyas, password: admin. here are couple of images showing the web app UI:

Alt imgs Alt imgs Alt imgs Alt imgs Alt imgs Alt imgs Alt imgs Alt imgs

access-control-web-ui's People

Contributors

medyas avatar

Stargazers

 avatar

Watchers

 avatar  avatar

access-control-web-ui's Issues

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.