Skip to content

๐ŸŒฑ๐Ÿ›’โ€Š A project involving management of seedlings system with implemented functionalities such as: user authentication, passwords encryption (using Argon), sessions, payments (using PayPal) and account email notifications, and connection to a database (MySQL).

Notifications You must be signed in to change notification settings

filipwroblewski/oto_sadzonki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Oto sadzonki (seedling management system)

Overview

YouTube video

Users

  • Admin
    • display users
    • remove users
    • change user data: name, email, role(admin, employee, user)
    • add new user (name, email, role)
  • Employee
    • display seedlings
    • remove seedlings
    • change seedling data: name, description, price, quantity
    • add new seedling data: name, description, price, quantity
    • display orders
    • set order as sent + send email notification
  • User (default)
    • display seedlings
    • place order (select seedlings, set quantity per seedling)
    • payment using PayPal
    • display orders
    • display ready orders

Database structure

Users table

CREATE TABLE `users` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(50) NOT NULL,
  `role` set('user','admin','employee') NOT NULL DEFAULT 'user',
  `email` varchar(100) NOT NULL,
  `pass` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

users table

Seedlings table

CREATE TABLE `seedlings` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `quantity` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

users table

Orders table

CREATE TABLE `orders` (
  `id` int(10) UNSIGNED NOT NULL,
  `seedling_id` int(10) UNSIGNED NOT NULL,
  `order_quantity` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `status` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

users table

Payments table

CREATE TABLE `payment` (
  `id` int(10) UNSIGNED NOT NULL,
  `user` varchar(255) NOT NULL,
  `full_price` float NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

users table

Functionalities

  • passwords encrypted using argon
  • user data sending by sessions
  • after successful purchase data are insert into database
  • payment realised using PayPal and sandbox account
  • email notification realised by PHPMailer
  • MySQL is used for database

Set Up

Create directory and files in root directory (where are files ex. index.php and README.md):

โ”œโ”€โ”€โ”€credentials
โ”‚   โ”œโ”€โ”€โ”€db-login.php
โ”‚   โ”œโ”€โ”€โ”€email-login.php
โ”œโ”€โ”€โ”€paypal
โ”‚   โ”œโ”€โ”€โ”€client-id.php

db-login.php

<?php
    $login = '';  // your db login
    $pass = ''; // your db password
?>

email-login.php

<?php
    $email = ''; // your email
    $pass = ''; // your email password
?>

client-id.php

<?php
    $clientId = ''; // your paypal client id
?>

About

๐ŸŒฑ๐Ÿ›’โ€Š A project involving management of seedlings system with implemented functionalities such as: user authentication, passwords encryption (using Argon), sessions, payments (using PayPal) and account email notifications, and connection to a database (MySQL).

Topics

Resources

Stars

Watchers

Forks

Languages