Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lzaquine/mAIspace-server

Repository files navigation

mAIspace is a single-page app for users to interact with AI. 9 different apps were created with AI about various subjects and with different returns each time.



User Stories

  • Sign up - As a user, I want to sign up.
  • Login - As a user, I want to be able to log in.
  • Logout - As a user, I want to be able to log out.
  • Profile - As a user, I want to be able to see my profile.
  • Edit Profile - As a user, I want to be able to edit my profile.
  • Delete Profile - As a user, I want to be able to delete my account.
  • Home - As a user, I want to access the home page.
  • App: As a user, I want to access all the apps page.
  • App Name: As a user, I want to access the app's page.


Client / Frontend

React Router Routes (React App)

Path Page Permissions Behavior
/login LoginPage anon only Login form, navigates to home page after login.
/signup SignupPage anon only Signup form, navigates to home page after signup.
/ HomePage public Home page.
/profile Profile user only User and player profile for the current user.
/profile/edit EditProfile user only Edit user profile form.
/apps Apps user only Apps form.
/:apps/:appName App Name user only App cards.

Components

Pages:

  • LoginPage

  • SignupPage

  • HomePage

  • ProfilePage

  • EditProfilePage

  • Apps

  • App/appName


Server / Backend

Models:


User model

{
name: {
type: String,
required: true
}
email: {
type: String,
required: true,
unique: true
},
password: {
type: String,
required: true
},
profileImg: {
type: String,
default: 'https://res.cloudinary.com/dvzekm9zq/image/upload/v1660147231/cards/avatar_bpem8o.png'
},
field: {
type: String,
required: true,
enum: ['Fun', 'Business', 'Programmer', 'Teacher']},
createdResults: [{ type: Schema.Types.ObjectId, ref:'Requests' }]

}

App model

{
appDescription: { type: String },
appName: { type: String }
}

Result model

{
appName: { type: String },
userInput: { type: String },
result: { type: String }
}

API Endpoints (backend routes)

HTTP Method URL Request Body Success status Error Status Description
POST /auth/signup {name, email, password, field, profileImg} 201 404 Checks if fields not empty (422) and user not exists (409), then create user with encrypted password, and store user in session
POST /auth/login {email, password} 200 401 Checks if fields not empty (422), if user exists (404), and if password matches (404), then stores user in session
GET /profile/:id show specific profile
PUT /editprofile/:id { name, profileImg } 201 400 edit profile
DELETE /profile/:id 200 400 delete profile
GET /app 400 Show all apps
POST /app { model, prompt, temperature, max_tokens, top_p, frequency_penalty, presence_penalty } 201 400 Create and save a new app
GET /app/:appName Show specific app
POST /app/:appName {appName, question } add results




mAIspace



API

OpenAI


Git

Client Repository

Server Repository

Deployed App


Contributors

Lucas Zaquine - GitHub - LinkedIn

About

mAIspace is a single-page app for users to interact with AI. 9 different apps were created with AI about various subjects and with different returns each time. - Server - 3rd Project!

Topics

Resources

Readme

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors