This is a secondary version of the nanoDB app written by Ishtehar Hussain for Intertrac Nano. The web application is written mostly in PHP on Laravel 5.4 Framework. Following are some basic instructions to get you up and running on how to run this app on a local artisan server (or similar).
1. Requirements.
Some general requirements. You may have work-arounds on these.
-
PHP, Laravel (>=5.4), Basically everything you need to launch a laravel app on a local machine.
-
Mysql database. You need access to a mysql database where we will create our database schema.
-
Sparkpost Key We send email for password resets. So if you want access to this feature then you need a register a domain on SparkPost and obtain a key for that domain.
-
Also needs internet to access Bootstrap and Jquery files/scripts/styles etc.
2. Set Up.
-
Clone or Download the repository
-
Modify the Database creation script.
Since only authenticated users can access the features we are going to create one with admin previledges.
A sql creation script called 'default_db.sql' is given. Modify one of the insert statements for the users table with your name and email data. Also set the admin field to 1.
- Create a mysql database.
We have not used database migrations on this project. You can use this script to create your database tables. Some basic data is also provided.
DB_CONNECTION=mysql
DB_HOST=your-db-host
DB_PORT=your-db-port
DB_DATABASE=your-db-name
DB_USERNAME=your-db-username
DB_PASSWORD=your-db-password
MAIL_DRIVER=sparkpost
SPARKPOST_KEY=your-secret-sparkpost-key
</code>
- Create a ENV file.
You must create a (.env) file to hold all your environment variables. Create it at the root level of your app directory structure. The following fields must be set.
- Run your server
The simplest way is to use the artisan console to run a local server
php artisan serve
- Reset your account password
If you followed the instructions then the user table in the database contains an entry with your email address which has admin privileges.
Now the password must be reset. Go to the homepage and click on log-in and then forgot passwords. Follow the instructions on resetting the password. Once the password has been reset you are ready to use the app using all features and admin privileges.
-- END --
- Put a copy of production sql in
.docker/nano_db.sql
docker compose up
- Site is on - http://localhost
July 2, 2017 Paginator added to the tyres catalog in the 'new_lc' form. Paginator now uses ajax requests to only refresh the tyre catalog instead of the entire page.
July 1, 2017 Validation logic for new_lc form. We are now using Validators.
June 29, 2017 Added basic laravel validation to LcController. The error messages use the name from the 'name' attribute of each for field. Error messages are displayed in the form if there are errors.
June 28, 2017 Added auth as middleware to the base Controllers Added admin middleware to add new user action.
June 27, 2017/
Created a new middleware CheckAdmin
and attached to LcController
June 23, 2017
Starting to implement user authentication.
Implemented login and register.
June 19, 2017 Displaying order informtion using ajax in 'payments/create' end-point
June 18, 2017 '/stock' end-point works - shows current stock
June 16, 2017 Order profile page. Bootstrapify most tables
June 15, 2017
Added new create function (createGivenLC
) in ConsignmentController
which passes in the LC number and does the same things as create
function
Some more bootstrap.
Consignment profile page.
June 21, 2017 Implemented editing of basic customer info in customer profile page. Edit function in CustomerController is not needed, as we display the form right in the profile page.
June 12, 2017 Beginning integration of Twitter Bootstap Framework for front-end.
June 7, 2017 Added containers section in Consignments.
June 6, 2017 LC profile page now has display sections Performa invoice and Consignments belonging to LC.
June 4, 2017 Can insert performa invoice along with LC in one go. (previously tried on May 7)
May 31, 2017 Added profile pages for LCs and Perform Incoices.
May 28, 2017 Remove item button in end-point 'performa_invoice/create'
May 24, 2017
Can add directly from /container_contents/create
without having to attach a new container to a consignment first.
May 22, 2017 Order contents are properly filled. TEST TO CHECK ONE ITEM ENTERED FROM MULTIPLE CONTAINERS.
May 17, 2017 Implemented sql for stock-remaining. THIS CODE WILL BE REUSED
May 14, 2017 Added functionality to add tyres to containers (Commercial Invoice.)
May 7, 2017 Can insert performa invoice along with LC in one go.
May 7, 2017 Integrating Consignemnt_container end-point. Database on server contains inconsistencies. Update changes on db model.
May 6, 2017 Integrating Consignment end-point. First table with foreign key constraints.
May 5, 2017 Removed hard-coded database credentials.
May 2, 2017 MVC for LC end-point
May 1, 2017
- Added the sql file for our database schema. Note: (Posed on June 12, 2017) : The sql file is not valid anymore. Made changes to the schema
- Implemented most of tyre end-point
Apr 30, 2017 Main menu built along with its animatable sub-menu.
Apr 26, 2017 Changed database to chaos_db
Apr 25, 2017 Can pull raw info from database tables now.