Code Monkey home page Code Monkey logo

blog-system's Introduction

Blog System

This repository houses a back-end solution for creating and managing a fully functional blogging platform.

Overview

The Back-End Blog System is built with a focus on scalability and extensibility. It provides a reliable and feature-rich environment for handling aspects of a blog, including user management, post creation.

Technologies Used

Programming Language: TypeScript

Framework: Express

Database: MongoDB

Installation

  1. First clone this repo with the following command line:

git clone https://github.com/cesarhenrq/blog-system.git

  1. Then navigate to project folder:

cd blog-system

  1. Now run this command, to install project dependencies:

npm i

  1. Set up your envoiriment variables. Create and file .env at the project root and create two variables like as follow:

DATABASE_URL=YOUR_DB_URL PORT=ANY_PORT_YOU_PREFER

Usage

This API has 3 routes. Explained as follow:

  1. POST: BASE_URL/users Through this route you can create an user, passing the following properties at request body: fullname, nickname and email.
  2. POST: BASE_URL/posts Through this route you can create an post and associate it to an user, passing the following properties at request body: content, authorId.
  3. GET: BASE_URL/users Through this route you can fetch all user informations and his following posts. The information is pagineted that has page equal 1 and limit equal 10 by default, but if your pass some of these as query you can set up the page and the limit as you want.

Entity

User

Properties Type Constraints
id ObjectId unique
fullname string required
nickname string required
email string required, unique
postos string[] none

Post

Properties Type Constraints
id ObjectId unique
content string required, minlength(1), maxlength(240)
author string required

Database Diagram

The entities and its relations on database are ilustrated at the following diagram:

Diagram

Contributions

Contributions to the Back-End Blog System are more than welcome! If you find any issues, bugs, or have suggestions for improvements, please feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

blog-system's People

Contributors

cesarhenrq 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.