Skip to content

toddanglin/TeamThing

Repository files navigation

#TeamThing™ Demo App

The TeamThing demo app is designed to show-off the capabilities of Kendo UI Mobile, a HTML5 mobile app framework that helps developers create apps that automatically adapt to the look-and-feel of different devices.

NOTE: TeamThing is not an official Kendo UI product. It is an unsupported demo, meant to be used as a learning tool. Use at your own risk.

##What is TeamThing? TeamThing is an app that helps teams easily keep track of what everyone is doing. It's like a task list for teams.

Users can do the following things in the TeamThing app:

  • Join a team
  • Create new Things
  • Update Thing status (InProgress/Completed/Delayed/Deleted)
  • Browse personal Things for current team
  • View other team members

##How do you use TeamThing? To use TeamThing, simply browse to the TeamThing app from any supported mobile device. In the current version, iOS, Android, and BlackBerry are supported.

To use the demo, you can log-in with the following credentials:

TeamThing will automatically adapt to the look-and-feel of your device, providing a "native" experience wherever you use it. No need for separate apps or code for each device.

##How is TeamThing built? TeamThing consists of two primary pieces:

  1. Kendo UI Mobile powered HTML/JavaScript front-end app
  2. JSON REST API (using Web API)

The demo app is deployed to AppHarbor. An additional browser-based admin interface is also being developed.

###Kendo UI Mobile App You can find the files specific the Kendo UI Mobile app in:

(Root) > TeamThing.Web > Mobile

This folder contains the HTML, JavaScript, and CSS needed for the mobile app.

The bulk of the app's logic is contained in two files:

  • teamthing.app.js
  • teamthing.data.js

The starting point for the app, which includes the Kendo UI Mobile Application initialization is contained in:

  • index.html

###REST API The TeamThing RESTful API is built using ASP.NET MVC 4's Web API and Telerik's free OpenAccess ORM communicating with a cloud-hosted SQL Server instance. The primary app endpoints can be found in:

(Root) > TeamThing.Web > Controllers > Thing/Team/UserController.cs

#Improving the Demo TeamThing is a living demo, far from finished or perfect. You can help make the demo better! Take a look at the existing Issues on GitHub and make your own suggestions for improvement.

TeamThing Issues on GitHub

There are a number of features planned but not yet implemented, including things like data security and federated log-in.

#TeamThing Service API Documentation of the TeamThing RESTful API

##User Methods Search Users
Most standard odata search conventions can be used to search for users.

Request TypeUrlResult
GET /api/user
Example:
/api/user?$filter=EmailAddress ne null and tolower(EmailAddress) eq '[email protected]'
SUCCESS - 200 Ok
[{"EmailAddress":"[email protected]", 
    	    Id":6}]
FAILURE - 200 OK
Returns empty array for no results

Sign in an Existing User

Request TypeUrlParamsResult
POST /api/user/signin {"EmailAddress":"[email protected]"} SUCCESS - 200 Ok
{"EmailAddress":"[email protected]",
"Id":6,
"PendingTeams":[],
"Teams":[{"Administrators":[6],
			"Id":6,
			"IsPublic":true,
			"Name":"567 asdfasdf",
			"OwnerId":6},
		{"Administrators":[6],
			"Id":8,
			"IsPublic":false,
			"Name":"Test Team",
			"OwnerId":6}],
"Things":[{"Description":"Test thing",
		"Id":5,"Status":
		"InProgress"}]
}
    	
Failure 400: Bad Request Returns JSON error array
["A user does not exist 	
with this user name."]

Register a New User

Request TypeUrlParamsResult
POST /api/user/register {"EmailAddress":"[email protected]"} SUCCESS - 200 Ok
{"EmailAddress":"[email protected]",
	"Id":7,
	"PendingTeams":[],
	"Teams":[],
	"Things":[]
	}
    	
Failure 400: Bad Request Returns JSON error array
["A user with this email 
address has already registered!"]

##Team Methods

Search Teams
Most standard odata search conventions can be used to search for teams.

Request TypeUrlResult
GET /api/team
Example:
/api/team?$filter=Name ne null and tolower(Name) eq 'closed team'
SUCCESS - 200 Ok
[{"Id":4,
	"IsPublic":false,
	"Name":"Closed Team",
	"PendingTeamMembers":[{"EmailAddress":"[email protected]",
							"FullName":" ",
							"Id":5,
							"Role":"Viewer"}],
	"TeamMembers":[{"EmailAddress":"[email protected]",
					"FullName":" ",
					"Id":6,
					"Role":"Administrator"}]
}]
FAILURE - 200 Ok
Returns empty array for no results

Get a Team

Request TypeUrlParamsResult
GET /api/team/6 SUCCESS - 200 Ok
{"Id":6,
"IsPublic":true,
"Name":"567 asdfasdf",
"PendingTeamMembers":[],
"TeamMembers":[{"EmailAddress":"[email protected]",
				"FullName":" ",
				"Id":6,
				"Role":"Administrator"}]}
    	
Failure 400: Bad Request Returns JSON error array
["Invalid Team"]

Create a Team

Request TypeUrlParamsResult
POST /api/team
{"name":"asdf",
"ispublic":true,
"createdById":6}
    	
SUCCESS - 201 Created
{"Administrators":[6],
 "Id":19,
 "IsPublic":false,
 "Name":"My new team",
 "OwnerId":6}
    	
Failure - 400 Bad Request
When any data is invalid returns JSON error array
["A team must have a name"]

Update a Team

Request TypeUrlParamsResult
PUT /api/team/8
{"name":
"Test Team2",
"ispublic":true,
"updatedbyid":6}
    	
SUCCESS - 201 Created
{"Id":8,
"IsPublic":true,
"Name":"Test Team2",
"PendingTeamMembers":[],
"TeamMembers":[{"EmailAddress":"[email protected]",
				"FullName":" ",
				"Id":6,
				"Role":"Administrator"},
				{"EmailAddress":"[email protected]",
				"FullName":" ",
				"Id":7,
				"Role":"Viewer"}]}
    	
Failure - 400 Bad Request
When any data is invalid returns JSON error array
["Team name already in use"]

Delete a Team

Request TypeUrlParamsResult
DELETE /api/team/8
{"userId":6}
SUCCESS - 204 No Content
FAILURE - 400 Bad Request
When any data is invalid returns JSON error array
["Invalid Team"]

Add a User to Team

Request TypeUrlParamsResult
PUT /api/team/6/join
{"userId":6}
SUCCESS - 200 Ok
{"Id":6,"IsPublic":false,
"Name":"Test Team",
"PendingTeamMembers":[{"EmailAddress":"[email protected]",
					"FullName":" ",
					"Id":7,
					"Role":"Viewer"}],
"TeamMembers":[{"EmailAddress":"[email protected]",
				"FullName":" ",
				"Id":6,
				"Role":"Administrator"}]}
    	
Failure - 400 Bad Request
When any data is invalid returns JSON error array
["Invalid Team"]

Approve Pending Team Member

Request TypeUrlParamsResult
PUT /api/team/6/approvemember
{"userId":7}
SUCCESS - 200 OK
	FAILURE<br/>
	    	
	404 Not Found - When invalid team or user<br/>
	Returns JSON error array
<pre>["Invalid Team"]</pre>
</td>

Deny User

Request TypeUrlParamsResult
PUT /api/team/6/denymember
{"userId":7}
SUCCESS - 200 OK
	FAILURE  <br/>
	
	404 Not Found - When invalid team or user<br/>
400 Bad Request - When trying to deny access to team owner
<pre>["Invalid Team"]</pre>
</td>

##Thing Methods Search Things
Most standard odata search conventions can be used to search for things.

Request TypeUrlResult
GET /api/thing
Example:
/api/thing?$filter=Description ne null and indexof(Description, 'd') ge 1
SUCCESS - 200 Ok
[{"Description":"asdfasdf",
	"Id":3,
	"Status":"InProgress"},
  {"Description":"vcdfasdfasdf",
   "Id":4,
   "Status":"InProgress"},
  {"Description":"a sdfasdf ",
  "Id":6,
  "Status":"InProgress"}]
FAILURE - 200 Ok
Returns empty array for no results

Get a Thing

Request TypeUrlParamsResult
GET /api/thing/8

    
SUCCESS - 200 OK
{"Description":"a sdfasdf ",
 "Id":6,
 "Status":"InProgress"}
    
	Failure - 400 Bad Request<br/>
	When any data is invalid returns JSON error array
<pre>["Invalid Thing"]</pre>
</td>

Create a new Thing

Request TypeUrlParamsResult
POST /api/thing
{"CreatedById":5,
"Description":"My New Thing",
"AssignedTo":[5,6], 
"teamId":10}
SUCCESS - 200 Ok
{"AssignedTo":[{"EmailAddress":"[email protected]",
				"Id":7,
				"ImagePath":"\/images\/GenericUserImage.gif"}],
"DateCreated":"\/Date(1333463568863-0500)\/",
"Description":"test",
"Id":52,
"Owner":{"EmailAddress":"[email protected]",
	"Id":11,
	"ImagePath":"\/images\/GenericUserImage.gif"},
"Status":"InProgress",
"Team":{"Administrators":[7],
	"Id":20,
	"ImagePath":
	"\/images\/GenericUserImage.gif",
	"IsPublic":false,
	"Name":"A Sweet Team",
	"OwnerId":7}}
    	
Failure - 400 Bad Request
When any data is invalid returns JSON error array
["A thing must be assigned to 1 or more people"]

Update a Thing

Request TypeUrlParamsResult
PUT /api/thing/8

    
SUCCESS - 200 OK
	Failure - 400 Bad Request<br/>
	When any data is invalid returns JSON error array
<pre>["A thing must be assigned to 1 or more people"]</pre>
</td>

Delete a Thing

Request TypeUrlParamsResult
DELETE /api/thing/8
{"DeletedById":6}
SUCCESS - 204 No Content
	Failure - 400 Bad Request<br/>
	When any data is invalid returns JSON error array
<pre>["Invalid Thing"]</pre>
</td>

Complete a Thing

Request TypeUrlParamsResult
PUT /api/thing/8/complete
{"UserId":10}
SUCCESS - 200 OK
{"Description":"a sdfasdf ",
 "Id":8,
 "Status":"Complete"}
    
	Failure - 400 Bad Request<br/>
	When any data is invalid returns JSON error array
<pre>["Invalid Thing"]</pre>
</td>

Update a Things Status

Request TypeUrlParamsResult
PUT /api/thing/8/updatestatus
{"UserId":10, "Status":"Completed"}
SUCCESS - 200 OK
{"Description":"a sdfasdf ",
 "Id":8,
 "Status":"Completed"}
    
	Failure - 400 Bad Request <br/>
	When any data is invalid returns JSON error array
<pre>["Invalid Thing"]</pre>
</td>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published