Pond Admins can manage ponds and the frogs in them. Frogs can mate in their selected ponds and develop their eggs into full grown adult frogs.
I wanted to separate frontend and backend development because to me both worlds have their own rightful strengths.
At frontend, Angular JS + Kendo UI is preferred. Angular JS supports single page application, secured and lightweight, has easy state management, and promotes modularity of codes through its MVC & MVVM Design Patterns. Since the application is mainly using Grids for it's display, I decided to use Kendo UI on top of Angular JS.
For the backend side, I wanted to challenge myself in using Express JS + PostgreSQL for my RESTful services instead of my comfort zone - Java + Spring + Hibernate.
To manage external libraries, I used NPM and Bower. To streamline building of the application, I created a grunt task.
Supposedly, I was about to use Karma + Jasmine but because it's already long overdue so I was not able to integrate.
Previously, I created a frontend authorization framework which I have partly applied to this application. For more details, please visit and download Kahayag.
By now, PostgreSQL and PG Admin should already be installed. Below steps will help you to setup the database:
- Using PG Admin, create a new database called mypond.
- Right click on the newly created database and select Restore.
- Input the following into the shown Restore dialog
Format: Custom or tar
Filename: Locate the sql dump in app\src\backend\sql\mypond
Rolename: postgres
- Click Restore button.
- Check if tables are created.
- Using command prompt, go to the following path:
app/src/backend/service/DB.svc.js
. - Update the DB Connection URL in line 5 using the format:
postgres://{username}:{password}@localhost/mypond
- Using command prompt, make sure you are currently pointing to the Kokak Lush main folder which contains the package.json.
- Input command
npm install
. - Input command
bower install
.
- Using command prompt, go to the following path:
app/src/backend
. - Input command
node Backend.main.js
.
- Using command prompt, go to Kokak Lush main folder.
- Create a new folder called nwjs.
- Download current NWJS.io normal version.
- Extract the zip file and copy the contents to the created nwjs folder.
- From the main folder, input command
grunt build-dev
. - A dist folder should be automatically created.
- Go to dist folder.
- Make sure backend application is running at localhost:3000.
- Double click nw.exe.
- By default, Kokak Lush - Admin Mode is launched.
Kokak Lush frontend has 2 modes: admin mode and frog mode. To run both modes at the same time, just follow the following simple steps:
- Copy dist folder and rename it as dist_frog.
- Open the following file in a text editor: dist_frog/app/src/pondManagementSystem.config.js.
- In line 32, set the following value:
$rootScope.CURRENT_USER_TYPE = USER_TYPE.FROG;
.
**NOTE: ** For Admin mode, this value is $rootScope.CURRENT_USER_TYPE = USER_TYPE.ADMIN;
- Go back to dist_frog folder and open package.json in a text editor.
- Update name to my-pond-frog.
- Double click nw.exe to run in FROG MODE.
- Go back to dist folder and double click nw.exe to run in ADMIN MODE.
Known Issues are listed down in the Issues section.
Please setup Admin data before anything else.
- Register a pond admin user.
- Create a pond where pond phases will be auto-created for you.
- Add challenge questions to each phase.