- Tools Used
- Getting Started
- Usage
- Data Flow
- Data Models
- Model Props and Requirements
- The RaspBerryPi Schematics
- Change Log
- Authors
- Attributions
LiteBerryPi provides a platform for people to show that they are present with others, when they aren't able to physically be there.
It is a unique way to communicate with others and show that a user cares in a fun way that isn't a text or email. Quarantining further limits social interactions, and Lite-Berry Pi will bring friends and loved ones together despite not being able to physically visit.
LiteBerryPi is an ASP.NET Core restful API built on an MVC framework. users can register and login via a SwaggerUI on the apps homepage. Then use the generated token in postman to create and send designs!
Microsoft Visual Studio Community 2019 (Version 16.8.3)
- Clone the LiteBerryPi App and Server repositories.
- LiteBerryPi App
git clone https://github.com/Lite-Berry-pi/Lite-Berry-Pi.git
- LiteBerryPi Server
git clone https://github.com/Lite-Berry-pi/lite-berry-pi-server
- From the power shell use
dotnet restore
to bring dependencies. - From the package manager command line migrate and update the database.
Add-Migration initial
Update-Database
- For local use go to the
DesignsRepository
.
- Under the
GetDesignToSend
method change theurl
to your local host +/raspberrypi
. - The
RaspBerryPi
project goes on the RaspBerryPi client.- In
Program.cs
at the bottom of the main method change theurl
to your local host +/raspberrypi
.
- In
- For live deployment publish the App and Server as seperate Azure apps.
- Through the RaspBerryPi's command line turn the client on so it's listening for the server.
-
Users can register and login with the SwaggerUI or via postman:
https://lite-berry-pi20210208174150.azurewebsites.net/api/ApplicationUsers/Register
https://lite-berry-pi20210208174150.azurewebsites.net/api/ApplicationUsers/Login
-
Anyone can see the designs and send existing designs via the SwaggerUI.
-
To create new designs you have to be logged in. Login in with the API route above. Use that bearer token on postman to authorize the POST request.
https://lite-berry-pi20210208174150.azurewebsites.net/api/designs
to GET and POST designs.https://lite-berry-pi20210208174150.azurewebsites.net/api/designs/getdesign/{id}
to send a LiteBerry.
- User 1:many UserDesign
- User 1:1 ActivityLog
- UserDesign 1: many Design
route: /api/user
[
{
"id": 0,
"name": "string",
"activityLogs": [
{
"id": 0,
"loginTime": "2021-02-10T23:22:44.804Z",
"sendTime": "2021-02-10T23:22:44.804Z",
"designs": [...],
}
"userDesigns": [
{
"id": 0,
"title": "string",
"designCoords": "string"
}
]
}
]
route: /api/design
[
{
"id": 0,
"title": "string",
"timeStamp": "2021-02-10T23:48:54.091Z",
"designCoords": "string",
"userDesign": {...}
}
]
route: /api/activitylog
[
{
"id": 0,
"loginTime": "2021-02-10T23:51:25.048Z",
"sendTime": "2021-02-10T23:51:25.048Z",
"designs": [...],
"user": {...}
}
]
|
|
|||||||||||||||||||||||||||||||||||||||
|
pure join table
|
|||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||
|
- 02/08/2021 -
- Wired up the
ASP.NET Core
MVC
Api App. - Built the model classes for the database and set up composite keys.
- Seeded data to ensure the tables were being migrated and populated properly.
- Created route controllers.
/user
,/design
,/activitylog
- Brought in
Swagger
and set the default app route to theSwaggerUI
. - Built out
Interfaces
and createdservices
for our routes. - Repository patterns made for all routes and CRUD actions.
- Created Data Transfer Objects for front facing model views.
- Published restful API to Azure.
- Wired up the
- 02/09/2021 -
- Database troubleshooting, nuked the whole thing and re-migrated.
- Added
Identity
services to the app and assigned role permissions. - Built the client methods that take in the
string
from the server and unpacks it into usable data for the RaspBerryPi. - Added
SignalR
services for web socketing. - Built and published a
HUB
to act as our server for sending LiteBerries. - Opened the connection from the server to the RaspBerryPi client.
- 02/10/2021 -
- Made a new route in the design controller which makes a
GET
request to the design table, and sends that data to the server. - Brought in
Unitx
to write tests. - Created a mock database for the tests to run against.
- Made a new route in the design controller which makes a
- 02/11/2021 -
- Assigned roles to users at time of registration.
- Added permissions to the route controllers.
- Added tests for translating a
string
to light Ids, creating a User and Design, and communicating with the Hub server.
- Bade Habib
- John Cokos