GithubHelp home page GithubHelp logo

yardie83 / we-crm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webengfhnw/we-crm

0.0 1.0 0.0 1.74 MB

This is a reference project elaborated by the students step-by-step in every FHNW web engineering lecture.

License: Apache License 2.0

PHP 78.72% HTML 4.43% CSS 15.42% JavaScript 0.42% ApacheConf 1.02%

we-crm's Introduction

WE-CRM

Summary

This is a reference project elaborated by the students step-by-step in every FHNW web engineering lecture.

Process

Analysis

Scenario

WE-CRM (Web Engineering Customer-Relationship-Management) is the smallest possible and lightweight demonstration tool that allows agents to manage their customer data. Agents have an own access to their customer data. Besides, agents can email themselves an complete extract or create a PDF of their customers.

Use Case

  • UC-1 [Login on WE-CRM]: Agents can log-in by entering an email address and password. As an extension, new agents my register first.
  • UC-2 [Register on WE-CRM]: Agents can register to get an account (profile) to access the WE-CRM system.
  • UC-3 [Edit a customer]: Agents can create, update and delete customers.
  • UC-4 [Show a customer list]: Agents can get an overview over their customers based on a customer list. As an extension they can create, update and delete customers (UC-3), generate a PDF (UC-5) or send an email (UC-6).
  • UC-5 [Generate a PDF customer list]: Agents can generate a PDF containing a list of their customers.
  • UC-6 [Send customer list via email]: Agents can send an email containing a list of their customers to their own inbox.

Constraints

TODO: write

Design

Solution Strategy

TODO: write

Wireframe

Domain Model

Entity Relationship Diagram

Data Access Model

Business Logic Model

Implementation

Stage 1: Building a Static Website with Bootstrap

In stage 01 a bootstrap based prototype has been created by using a prototyping application.

In this case, the prototype application Bootstrap Studio has been used to create a basic user interface design based on an HTML grid, Bootstrap CSS and JavaScript, including the selection of web fonts and font-based icons.

The assets (HTML, CSS, JavaScript, image and font files) has been exported and will be extended in the later stages by PHP logic, and later with jQuery, to build a dynamic website.

Stage 2: PHP Files and Basic Router

In stage 02 the HTML prototype files will be transferred to PHP files, and a basic router functionality will be implemented.

The following .htaccess configuration ensures that HTTPS is used (except on localhost) and redirects everything (except asset requests) to the index.php file:

# .htaccess files provide a way to make configuration changes on a per-directory basis
RewriteEngine On

# this ensures that HTTPS is used except on localhost
RewriteCond %{HTTP_HOST} !=localhost
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]

# this redirects everything except asset requests to the index.php file
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(?!.*assets/)(.*) index.php [L,E=ORIGINAL_PATH:/$1]
RewriteRule assets/(.*) view/assets/$1 [NC,L]

The basic procedural router provides redirection, an error header, the PATH_INFO and a ROOT_URL global.

Finally, the link structure has been adapted according to the routers (router configuration) using the ROOT_URL global if required.

Stage 3: Database and .env Config Files

PostgreSQL
CREATE TABLE Customer (
  ID      SERIAL NOT NULL, 
  Name    varchar(255), 
  Email   varchar(255), 
  Mobile  varchar(255), 
  AgentID int4 NOT NULL, 
  PRIMARY KEY (ID));
CREATE TABLE Agent (
  ID       SERIAL NOT NULL, 
  Name     varchar(255), 
  Email    varchar(255), 
  Password varchar(255), 
  PRIMARY KEY (ID));
CREATE TABLE AuthToken (
  ID         SERIAL NOT NULL, 
  AgentID    int4 NOT NULL, 
  Selector   varchar(255), 
  Validator  varchar(255), 
  Expiration timestamp, 
  PRIMARY KEY (ID));
ALTER TABLE Customer ADD CONSTRAINT AgentCustomer FOREIGN KEY (AgentID) REFERENCES Agent (ID);
ALTER TABLE AuthToken ADD CONSTRAINT AgentToken FOREIGN KEY (AgentID) REFERENCES Agent (ID);

un-comment the following lines in php.ini:

extension=php_pdo_pgsql.dll extension=php_pgsql.dll

INSERT INTO agent (email, password) VALUES ('[email protected]','secret');

Evaluation and Deployment

Project Set-Up

TODO: write

Git

The project contains a .gitignore file to keep certain

Heroku Deployment

Deploy

Maintainer

License

we-crm's People

Contributors

andreasmartin avatar

Watchers

James Cloos 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.