This is a RESTful API for a Trello-like application, built with Node.js, Express.js, and MongoDB. It provides endpoints for managing boards, columns, and cards.
- Boards Management: Create, read, update, and delete boards.
- Columns Management: Create, read, update, and delete columns within boards.
- Cards Management: Create, read, update, and delete cards within columns.
- User Authentication: (Placeholder - to be implemented or described if already present)
- Error Handling: Centralized error handling for API responses.
- Validation: Joi-based request body validation.
- Node.js
- Express.js
- MongoDB (via Mongoose)
- Joi (for validation)
- http-status-codes
- dotenv
- cors
- Node.js (v14 or higher recommended)
- npm or Yarn
- MongoDB instance (local or cloud-based)
-
Clone the repository:
git clone <your-repository-url> cd trello-api-nodejs
-
Install dependencies:
npm install # or yarn install -
Create a
.envfile in the root directory based on.env.exampleand configure your environment variables, especially the MongoDB connection string:MONGODB_URI=your_mongodb_connection_string APP_HOST=localhost APP_PORT=8017 BUILD_MODE=dev
To start the development server:
npm start
# or
yarn startThe API will be running at http://localhost:8017 (or the port you configured).
(This section can be expanded with specific endpoint details, e.g., /v1/boards, /v1/columns, /v1/cards and their respective HTTP methods and request/response formats.)
.babelrc
.env.example
.eslintrc.cjs
.gitignore
jsconfig.json
package.json
yarn.lock
src/
├── server.js
├── config/
│ ├── cors.js
│ ├── environment.js
│ └── mongodb.js
├── controllers/
│ ├── boardControllers.js
│ ├── cardControllers.js
│ └── columnControllers.js
├── middlewares/
│ └── errorHandlingMiddlewares.js
├── models/
│ ├── boardModel.js
│ ├── cardModel.js
│ └── columnModel.js
├── routes/
│ ├── v1/
│ │ ├── boardRoutes.js
│ │ ├── cardRoutes.js
│ │ ├── columnRoutes.js
│ │ ├── index.js
│ │ └── userRoutes.js
│ └── v2/
├── services/
│ ├── boardServices.js
│ ├── cardServices.js
│ └── columnServices.js
├── utils/
│ ├── ApiErrors.js
│ ├── constrants.js
│ └── sorts.js
└── validations/
├── boardValidations.js
├── cardValidations.js
├── columnValidations.js
└── userValidations.js