The Backend will be a api for storing files asset files on a server for use by others or by you later. This API should have a account system for users to upload files Users should not need a account to just download
. These Entrys should have the proptrys described below
- Create Accounts
- Delete Accounts
- Create accounts using hashing for passwords (Or Just a name)
- Serve JWT for auth with server
- Search the database for assets (Mabey Filters)
- Save Assets
- Discription
- Image
- Name
- Size
- 3D/2D
- Number of downloads
- asset files - S3
- Login and user data store
- Storeing files for assets
- Storing images for asset discription
- Searching assets
- Offer assets based on what you have dowloaded before
- Comments/Ratings on assets
- asin - userId
- username - email
- password - hashed before stored
- date_created - timestamp
- asin - asset id
- userid - asin of the user who created the asset
(maybe multable)
<- - name - Name of the asset <-
- asset_location - Link to where asset files are stored on S3 for download
- discription - Discription of the asset
- images - Set of image links for files stored on S3
- asset_size - Size of files uploaded so S3 calculated at upload
- downloads - Number of times the asset has been downloaded <-
- compatable_engine_ver - Set of engine versions that work with asset <-
- date_posted - Date that the content was uploaded <-
Resources:
UserTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: "asin"
AttributeType: "S"
- AttributeName: "username"
AttributeType: "S"
KeySchema:
- AttributeName: "asin"
KeyType: "HASH"
- AttributeName: "username"
KeyType: "RANGE"
BillingMode: "PAY_PER_REQUEST"
TableName: "celtic_users"
AssetTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: "asin"
AttributeType: "S"
- AttributeName: "user_id"
AttributeType: "S"
KeySchema:
- AttributeName: "asin"
KeyType: "HASH"
- AttributeName: "user_id"
KeyType: "RANGE"
BillingMode: "PAY_PER_REQUEST"
TableName: "celtic_assets"
Creates user with given username/email and password. Hashes password before storing into database.
- username - username/email
- password - the users password
MUST BE HASHED BEFORE STORED
{
"username": "[email protected]",
"password": "password"
}
- JWT - Of user info
- Invalid Username or it already exist
- Password Doesnt meet requirements (MAYBE)
Uses username and password to return a JWT for authentication
- username - username/email
- password - the users password
{
"username": "[email protected]",
"password": "password"
}
- JWT - Of user info
- Invalid username
- Invalid password
Creates asset from for user with given prams
- JWT - Contains all user info as well
REQUIRED
- name - The name of the asset
REQUIRED
- description - Description of the asset
- images - The images to upload to the Asset page -> should have default image if none is provided
- compatable_engine_ver - all the engine versions that this is compatable with
REQUIRED
{
"jwt": "JWT",
"name": "Cool New Asset",
"description": "The description",
"images": "[]",
"compatable_engine_ver": "0.0.1"
}
- 200 -> Success
- Missing Fields (Name wasn't entered or compatable_engine_ver wasnt not entered)
Deletes asset from for user with given prams
- JWT - Contains all user info as well
REQUIRED
- asin - Set of all asssets to be deleted
REQUIRED
- password - user password
REQUIRED
{
"jwt": "JWT",
"asin": "[asin, asin1, ...]",
"password": "password"
}
- 200 -> Success
- Invalid password
- Asset Doesnt exist
Updates asset entry in database
- JWT - Contains all user info as well
REQUIRED
- asin - The asin of the asset that needs to be updated
REQUIRED
- name - The name of the asset
- description - Description of the asset
- images - The images to upload to the Asset page
- compatable_engine_ver - all the engine versions that this is compatable with
{
"jwt": "JWT",
"asin": "asin",
"name": "name",
"description": "description",
"images": "images",
"compatable_engine_ver": "compatable_engine_ver"
}
- 200 -> Success
- Asset doesnt exist
Gets the download link for the asset
- asin - The asin of the asset that is being requested
REQUIRED
{
"asin": "asin"
}
- asset_location
- Asset doesnt exist
Gets Users profiles
- asin - list of user ids
{
"asin": "userId",
}
- Users profile
- User profile doesnt exist
Updates user information
- JWT - Contains all user info as well
REQUIRED
- username - email
REQUIRED
{
"jwt": "JWT",
"username": "username"
}
- 200 -> Success
- Username already exist
Deletes the user
- JWT - Contains all user info as well
REQUIRED
- password - the users password
REQUIRED
{
"jwt": "JWT",
"password": "password"
}
- 200 -> Success
- Invalid Password
Updates user password
- JWT - Contains all user info as well
REQUIRED
- password - users password
REQUIRED
-
- newpassword - the new password
REQUIRED
- newpassword - the new password
{
"jwt": "JWT",
"password": "password",
"newpassword": "newpassword"
}
- 200 -> Success
- Passwords do not match
- Password doesnt meet requirements(MAYBE)
This should be able to take a list of any number of the assets attributes and find ones simlar to
- name - assets name
{
"name": "name",
}
- List of Assest with that name
- No assets found