UI flow - lianran/cmp GitHub Wiki
(0) Token incentive in general
-
Any positive effects should be rewarded
-
Fixed time windows - depends on blockchain settings (e.g. 10 mins, shall have fixed tokens to be issued) have community pool tokens
-
For each window, there are active transactions we care, we only generate rewarded tokens by smart contract
-
Total tokens is 100 millions, called CMAP
-
Each account has one wallet
-
CMAP token can be used in our system to buy training materials for free or event ticket for free
-
CMAP token can be exchanged with other popular tokens such as ETH (put on exchange) - future plan
(1) Employer or User Sign up form
User Signup form fields:
- Select Company. (drop down to select a company) (there will also be check box to know whether user want to create a company or not. if user checks that, that means user wants to create a company rather then selecting company from the drop down.Then some more form fields will appear:
- Company Name
- Company information
- Company Email
- Company phone no
- Company website
- User First Name
- User Last Name
- User name
- user email
- user phone no
- user password for the account
- payment address
- check box to know whether user wants to be reviewer or not.
Now if user submits the forms, Then based on user's input data, User account will be created. If user checks the first check box then a company account will also be created.
API: Signup the user object - bool signUp(user)
[pre-screen] - Home page [Post-screen] - The profile page
[Token Incentive] - None
smart contract
No action.
(2) Job Posting form
After sign up, user will login to his system. If user wants to post a job, then he will click the button 'Post a job'. Then a form will appear, where he will be needed to fill up the following fields to post a job.
- Job description
- Job location
- Job qualifications
- Job length
- A checkbox to decide whether this job required any reviewer or not.
- *summary: the short version of description.
After pressing the submit button Job will be saved in database and posted to the job board. After that, the view shall be switched to job board view with the latest post details (like what developer would see).
The database should generate a job id for every posted job.
[pre-screen] - The menu with "post job" option [Post-screen] - Job board
[Token Incentive] - None
API: Post the job object - bool postJob(job)
Suggestions
Use IPFS to store the data and record the hash of the data in blockchain maybe.
Smart Contract
- Name: PostJob
- Parameters: (Job_id, 6, 2, 3, 4, user_info)
- Return: Null
(3) Job Board
Now if any other developer goes to the job board he can see the list of jobs (sortable by fields). And from that job posting, developer will try to contact with the employer to get the job.
[pre-screen] - The menu with "job board" option [after-screen] - same
[Token Incentive] - None
API: get all jobs which is available for the user - bool getJobsSortedByDates(accountId)
Smart Contract
We provide a function to query job information from JobId.
- name: GetJobInfo
- Parameters: JobId
- Return: JobInfo
(4.0) Job Apply
Todo.
Smart Contract
- name: ApplyJob
- Parameters: JobId, Userid
- Return:Null
(4) Employer assign a job
Based on their internal communication, Employer will award the job to a developer. To do that, Employer will go that job posting, and there will be developer list, from where he will select a developer and press the 'Assign a Job'. Then in the system, a job history will be created and job status will be changed to ' Employer assign a job'.
[pre-screen] - profile page [after-screen] - profile page [Token Incentive] - Yes
API: get all jobs which is available for the user - bool assignJob(accountId, jobId)
Smart Contract
- name:AssignJob
- parameters: JobId, pubkey or UserId, DeveloperId
- Return: Null
(5) Job Start
Now the developer will get a notification based on that action where the developer need to accept the job offer. If he press the 'Accept button' then the job status will be changed to "Developer Starts job". That time a button will be visible to the developer which is 'End Task'
[pre-screen] - profile page [after-screen] - profile page
[Token Incentive] - Yes
API: startJob - bool startJob(accountId, jobId)
Smart Contract
- name:StartJob
- parameters: JobId, UserId
- Return: Null
(6) Job end (optional flow)
Developer will complete the project and send that to the employer internally and press the button 'End Task' in the system. Then the job status will be changed to "Developer Stops Job"
[pre-screen] - profile page [after-screen] - profile page
[Token Incentive] - Yes
API: completeJob - bool completeJob(accountId, jobId)
Smart Contract
- name:SubmitJob
- parameters: JobId, UserId
- Return: Null
(6.1) Job accept
Todo.
Smart Contract
- name:AcceptJob
- parameters: JobId
- Return: Null
(7) Developer Profile
The developer should be able to see his profile in his profile page and see Jobs in the Job boards and when he find one job interested and he shall save to his favorites for his late usage or follow up.
[pre-screen] - sign-on form [after-screen] - Profile
[Token Incentive] - None API: getProfile - user getProfile(accountId)
(8) Top ranked developers, employer report
We should be able show a report with top ranked employer and developer(at GMT 00:00 time each day). We highlight the trend of the ranking (daily).
[pre-screen] - menu items called "ranking" [after-screen] - ranking page
[Token Incentive] - Yes (for top 5% developers/employers)
API: getRankedDevelopers within the scope of the category- [] getRankedDevelopers(category)
API: getRankedEmployers within the scope of the category- [] getRankedEmployers(category)
(9) Employer un-post a job
The job is not available.
[pre-screen] - Profile [after-screen] - Profile
[Token Incentive] - None
API: unPostJob for the existing job which means the job is not available- [] unPostJob(accountId, jobId)
Smart Contract
- name:UnpostJob
- parameters: JobId
- Return: Null
(10) User posts a Challenge
When developer goes to the question board, there will be button 'Post a Challenge'. That button will redirect the user to the Challenge page with:
- Challenge Description
- Challenge vote window selection - for the vote to be executed during the window, and we disable the voting after the window (for example 1 day...)
[pre-screen] - Challenge board [after-screen] - Challenge board
[Token Incentive] - None
API: Post the job- bool postChallenge(accountId, challenge)
(11) Any user answer the posted challenge
These challenges should related with the current hot blockchain skill related. So we shall have a picklist for a category for the selection of the category (limit to 7-8 well divided developer skill categories)
When developer goes to the challenge board, he can see the challenge. And if he wants to answer any of these challenges, he will go to the challenge details page. There will be a "Answer" button through which developer can answer the question.
[pre-screen] - Challenge Page [after-screen] - Challenge Page
[Token Incentive] - Yes API: Answer the challenge - bool answerChallenge(accountId, challengeId, answer)
(12) Community users vote the answer of the posted challenge
A. When developer goes to the challenge board, he can see the challenges sorted by the datetime
API: Get all challenges and return a sorted list of challenge objects- [] getChallenges(void)
Flow: UI->Service->MySQL (Table of challenge)
B. If he clicks on that specific challenges he will be redirected to the challenge details pages with multiple answers available to see. And for any answer, there will be two button, 'Like', 'Dislike'. Use one simple window is fine so the person can see all in one window.
Note: A developer can give the answer of his own challenge but wait for for next day and also can not vote of his own challenge.
API: Get all sorted answers (by datetime) for the challenges- [] getAnswer(challengeId)
Flow: UI->Service->MySQL (Table of Answer)
[pre-screen] - Challenge Page [after-screen] - Challenge Page
[Token Incentive] - Rewarded entities (answer)
API: post the vote for that answer - bool vote(answerId, choice)
Flow: UI->Service->MySQL (Table of Vote)
(13) After voting window pass, we reward the best answer with most positive votes ([likes]-[dislikes]) and popular votes.
[Token Incentive] - Rewarded entities (the user posting the popular answer and the voters with popular answer)
API: bool rewardAnswer(accountId, txId);bool rewardVoter(accountId,txId)
Flow: Backend trigger during the reward time.
(14) Hottest Job posting and challenge
We should be able show a report with top ranked job posting and developer(at GMT 00:00 time each day). We highlight the trend of the ranking (daily).
[pre-screen] - Job ranking Page [after-screen] - Job ranking Page
[Token Incentive] - Yes
API: getHottestJobs sorted by hotness - [] getHottestJobs()
API: getHottestChallenges sorted by hotness - [] getHottestChallenges()