#Jamaica Agriculture Society - Marketing Information System
This application is built using the MEAN application stack. Mongo for persisting information, express framework for quick web application development, angular for front end and excellent data binding and Node.js the key ingredient to render, transform and communicate information to the users.
In this project we will be using Material design elements to give users the best possible experience on our platform.
Cheers!
It is necessary to setup the database URI for the application. To do this run the following:
export MONGOLAB_URI="mongodb://username:password@hostname:port/database_name"
Also in order to initialize session, ensure that you have an environment variable called SESSION_SECRET
for the application. So run the following:
export SESSION_SECRET="<yourownnumber>"
In order to initially setup the system. You must have a DEFAULT_USER="admin"
and a DEFAULT_PASS="21232f297a57a5a743894a0e4a801fc3"
or username: admin and password: admin.
Create a new administrator and remove DEFAULT_USER and DEFAULT_PASS
from the command line!
The system uses SendGrid to send emails. Like the above, run the following commands to ensure the application will be able to send emails:
export SENDGRID_USERNAME=<username>
export SENDGRID_PASSWORD=<password>
export FROM_EMAIL=<fromemailaddress>
export TO_EMAIL=<toemailaddress>
- Create all parishes with parish code and parish names
[POST /common/parishes]
- Import District and Extensions with matching parish names
[POST /common/districts]
- Import Branches and their Parish Code with
[POST /branches]
- Create all membership Types with distinct values (direct/branch etc)
[POST /membershipType]
- Create JSON array that matches the fields in the function
performTransform()
in thefarmer.js
file. - Load JSON array in request body and send the request to the
[POST /farmers]
. - Insert crop names and varieties
[POST /crops]
- Insert units
- Insert buyer types
- Sit back and watch the magic!
- The
Mailing address
is the farmer's residency address. If this isn't given, thefarmers address
by default is both the address of the farm and the farmer's residency address. - The number in the
acreage
field is the acreage for the farm with address given byfarmers address
. - The year range given by
2006-2007
means that the membership period is 1st of April2006
to the 31st of March2007
. - The symbol
√
and theA
in the year range columns have the same meaning (active registration for the period). - Direct members have always paid $1000 for dues.
- Branch members have always paid $200 for dues.
- Every member designated as being active for a period has paid his dues
- The parish code represents the parish for which the farmer is a member but NOT necessarily where he/she resides.
Cheers!