# Learn Smile with Lottery Example

# Objective

We will build a simple Lottery application. A Lottery application has the following requirements:

  • An user can create a new lottery game
  • An user can add participants
    • condition: a participant can only be added once
    • condition: a participant can only be added if a winner is not yet selected
  • An user can remove a participant
    • condition: if a winner is not yet selected
  • An user can run the lottery which will select a winner
    • condition: we can only select a winner if there is at least one participant
    • condition: we can only select a winner once, afterwards an error is produced when trying to select a new winner

# Scope

Will develop this project in four phases, each phase is complete on its own, but as we progress, new features of Smile will get introduced, and will discover how easily it can be achieved.

Phase Contains
Lottery Phase I Create Lottery Project
Create Lottery Mongo
Create Lottery Play
Web Reader
Web Writter
Rest Api
Lottery Phase II Lottery Domain Module
Integrate Play and Domain
Enhancement
Lottery Phase III Eventify
Events and Commands
Command Testing
Projection
Review Write DB
Send Mail
Lottery Phase IV Processor
Send Mail Using Bread
Send Mail
Lottery Phase V Export as a component
Lottery Phase VI Create Project
Add a View Module
Add Remote Api Point
Create Layout
Lottery Phase VII Implement Toolbar
Create Lottery Page
Lottery List Page
Add Participant Page
Run Lottery