Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prince9871/open-to-intern-project
This is a fully functional short backend intern project with a login system for students to apply for a college internship.
https://github.com/prince9871/open-to-intern-project
express javascript mongodb nodejs
Last synced: 2 days ago
JSON representation
This is a fully functional short backend intern project with a login system for students to apply for a college internship.
- Host: GitHub
- URL: https://github.com/prince9871/open-to-intern-project
- Owner: prince9871
- Created: 2022-09-13T11:01:26.000Z (about 2 years ago)
- Default Branch: project/internshipGroup47
- Last Pushed: 2022-09-15T17:40:00.000Z (about 2 years ago)
- Last Synced: 2024-11-12T16:08:57.178Z (2 days ago)
- Topics: express, javascript, mongodb, nodejs
- Language: JavaScript
- Homepage:
- Size: 3.89 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# project-internshipGroup47
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 groupThe 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 sampleA 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",
"interns": [
{
"_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"
}
]
}
}