DontStopPrograming / DontStopPrograming/Backend_standard

Create: Implementation of a CRUD REST API with Express.js and MongoDB

オープン
#3 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

Implement a REST API that allows performing CRUD (Create, Read, Update, Delete) operations on a specific resource using Express.js, MongoDB, and Mongoose. The implementation should follow principles of separation if concerns, Clean Architecture, and best practices in managing routes, controllers, services, and models.

Task to complete:

1.Develop the project structure:

- Set up a Node.js project with TypeScript
- Organize the folder and file structure to reflect the separation of concerns

2.Configure MongoDB connection:

- Create a configuration file for connecting to MongoDB using Mongoose.
- Ensure the connection correctly uses the database specified in the .env file

3.Define the resource model and interface:

- Create the resource interface(e.g. Vehicle) that reflects the required properties.
- Implemente the Mongoose Schema and Model based on the interface

4.Implement CRUD services:

- Develop service functions to handle CRUD operations for the resource
- Ensure that service functions are decoupled from the controllers

5.Create controllers and routes:

- Implement controllers that manage HTTP request for CRUD operations
- Define and set up the corresponding REST routes in Express.js

6.Add validations and error handling:

- Implement data validations in the controllers or models
- Create an error-handling middleware to capture and manage exceptions in the API

7.Document the API:

- Provice clear and concise documentation

8.Perform functional testing:

- Use tools like Postman, ThunderClient to test and validate CRUD operations
- Ensure that data is correctly stored, update and deleted in MongoDB

Criteria:

- The API should allow performing all CRUD operations on the defined resource.
- The database connection should be stable and use the database specified in the .env file
- The project structure should follow Clean Architecture principles and coding best practices

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by inspecting the repository structure and existing project configuration before planning the implementation. The issue identifies the needed layers—configuration, models, services, controllers, routes, validation, and error handling—and names .env, Postman, and ThunderClient as relevant entry points. Done means CRUD operations work for the chosen resource, MongoDB uses the .env database, and the API is documented and functionally tested.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
express, mongodb, nodejs, typescript
領域
api, backend, database
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。