Git Product home page Git Product logo

project2-open-to-intern-'s Introduction

Uranium

Open to Intern Project Requirement

Key points

  • Create a group database groupXDatabase. You can clean the db you previously used and resue that.
  • This time each group should have a single git branch. Coordinate amongst yourselves by ensuring every next person pulls the code last pushed by a team mate. You branch will be checked as part of the demo. Branch name should follow the naming convention project/internshipGroupX
  • Follow the naming conventions exactly as instructed. The backend code will be integrated with the front-end application which means any mismatch in the expected request body will lead to failure in successful integration.

Models

  • College Model
{ name: { mandatory, unique, example iith}, fullName: {mandatory, example `Indian Institute of Technology, Hyderabad`}, logoLink: {mandatory}, isDeleted: {boolean, default: false} }
  • Intern Model
{ name: {mandatory}, email: {mandatory, valid email, unique}, mobile: {mandatory, valid mobile number, unique}, collegeId: {ObjectId, ref to college model, isDeleted: {boolean, default: false}}

POST /functionup/colleges

  • Create a college - a document for each member of the group

  • The logo link will be provided to you by the mentors. This link is a s3 (Amazon's Simple Service) url. Try accessing the link to see if the link is public or not.

    Endpoint: BASE_URL/functionup/colleges

POST /functionup/interns

  • Create a document for an intern.

  • Also save the collegeId along with the document. Your request body contains the following fields - { name, mobile, email, collegeName}

  • Return HTTP status 201 on a succesful document creation. Also return the document. The response should be a JSON object like this

  • Return HTTP status 400 for an invalid request with a response body like this

GET /functionup/collegeDetails

  • Returns the college details for the requested college (Expect a query parameter by the name collegeName. This is anabbreviated college name. For example iith)
  • Returns the list of all interns who have applied for internship at this college.
  • The response structure should look like this

Testing

  • To test these apis create a new collection in Postman named Project 2 Internship
  • Each api should have a new request in this collection
  • Each request in the collection should be rightly named. Eg Create college, Get college details etc
  • Each member of each team should have their tests in running state

Refer below sample

A Postman collection and request sample

Response

Successful Response structure

{
  status: true,
  data: {

  }
}

Error Response structure

{
  status: false,
  message: ""
}

Collections samples

College

{
    "name" : "iith",
    "fullName" : "Indian Institute of Technology, Hyderabad",
    "logoLink" : "https://functionup.s3.ap-south-1.amazonaws.com/colleges/iith.png",
    "isDeleted" : false
}

Intern

   {
    "isDeleted" : false,
    "name" : "Jane Does",
    "email" : "[email protected]",
    "mobile" : "90000900000",
    "collegeId" : ObjectId("888771129c9ea621dc7f5e3b")
}

Response samples

College details

{
  "data": {
    "name": "xyz",
    "fullName": "Some Institute of Engineering and Technology",
    "logoLink": "some public s3 link for a college logo",
    "interests": [
      {
        "_id": "123a47301a53ecaeea02be59",
        "name": "Jane Doe",
        "email": "[email protected]",
        "mobile": "8888888888"
      },
      {
        "_id": "45692c0e1a53ecaeea02b1ac",
        "name": "John Doe",
        "email": "[email protected]",
        "mobile": "9999999999"
      },
      {
        "_id": "7898d0251a53ecaeea02a623",
        "name": "Sukruti",
        "email": "[email protected]",
        "mobile": "9191919191"
      },
      {
        "_id": "999803da1a53ecaeea02a07e",
        "name": "Neeraj Kumar",
        "email": "[email protected]",
        "mobile": "9898989898"
      }
    ]
  }
}

project2-open-to-intern-'s People

Contributors

bhagabanghadai avatar iamppborah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.