Skip to content

IDENTIFIER is a backend application that has a CRUD of users, has middleware for admin accounts that can see all user data, only one user by email and ordinary logged in users can update their own data and delete their own accounts.

License

Notifications You must be signed in to change notification settings

th14g0d3v/identifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation



Identifier   |    Summary   |    Tecnologies   |    Project   |    Usage   |    Playground   |    Challenge   |    License   |    Credits




Identifier is a backend application that has CRUD users, has middleware for admin where this account can see all users, only one user and only logged-in users can delete their own accounts or update their own data.
This structure was created only to help those who are starting with studies in test driven development, domain driven design, clean architecture and design pattern.



Install the MongoDB

MongoDB

Clone the repository to the desired folder.

git clone https://github.com/th14g0d3v/identifier.git

Navigate to the repository folder.

cd identifier/backend

Install the necessary packages for the project.

npm install or yarn

Start the mongoDB(on linux).

sudo systemctl start mongod

Test the the server.

yarn test

Turn on the server, which is at 127.0.0.1:7777.

yarn tsdev



In Browser

http://localhost:7777/graphql

mutation {
  signUp(
    email: "jack@mail.com"
    password: "jack"
    passwordConfirmation: "jack"
  ) {
    email
  }
}

query {
  login(email: "jack@mail.com", password: "jack") {
    accessToken
    email
  }
}

mutation {
  delete(email: "jack@mail.com") {
    result
  }
}

mutation {
  update(
    currentEmail: "jack@mail.com"
    newEmail: "sparrow@mail.com"
    newPassword: "sparrow"
  ) {
    email
  }
}

query {
  all {
    email
    password
  }
}

query {
  load(email: "jack@mail.com") {
    email
    password
  }
}


  • Create an account
  • Log in to an account
  • Delete an account just logged in
  • Update an account just logged in
  • View all accounts just logged in
  • View an account just logged in


This project is under the MIT license. See the LICENSE file for more details.




About

IDENTIFIER is a backend application that has a CRUD of users, has middleware for admin accounts that can see all user data, only one user by email and ordinary logged in users can update their own data and delete their own accounts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published