A Node.js Express backend for a Stackoverflow like answering forum, with RESTful endpoints

Overview

answering-forum-backend

License Contributors GitHub forks GitHub Repo stars Last Commit Node.js CI

A Node.js Express backend for a Stackoverflow like answering forum, with RESTful endpoints, written in es6 style with linted and comprehensively unit-tested code. Utilizes a local json database using fs but has full separation of concern to implement anything else.

Created as a part of week 0 of Swiggy i++ learning programme, round 2.

Contents

Setup

  1. Install NodeJS and any NodeJS package manager.

  2. Run npm install or yarn install to install the dependencies.

  3. Run npm run build or yarn build once to let babel build the application on ./lib/.

Usage

Run npm run start or yarn start after building to run the application on localhost:4000 (default).

Project Structure

The project's code structure loosely follows MVC model while maintaing complete seperation of concern.

  • answering-forum-backend
    • src
      • controllers
        • login_post.js
        • answers
          • answer_post.js
        • questions
          • question_get.js
          • question_post.js
        • register_post.js
      • database
        • answers.json
        • questions.json
        • users.json
      • models
        • answer_data.js
        • question_data.js
        • user_data.js
      • repositories
        • answers.js
        • questions.js
        • users.js
      • routes
        • login.js
        • question
          • questionID
            • answer.js
            • index.js
          • index.js
        • register.js
      • utils
        • validators.js
      • index.js
    • tests
      • controllers
        • answer
          • answer_post.test.js
        • question
          • question_get.test.js
          • question_post.test.js
        • login_post.test.js
        • register_post.test.js
      • database
        • answers.test.json
        • questions.test.json
        • users.test.json
      • repositories
        • answers.test.js
        • questions.test.js
        • users.test.js
    • .eslintrc.yml
    • babel.config.json
    • package.json
    • package-lock.json

License

This project is licensed under the MIT License. See the LICENSE for details.

Contributing

Feel free to contribute pull requests, issues for either APIs or tests. See the CONTRIBUTING.md for details.

Tests

Run npm test or yarn test to run the unit tests. Feel free to add your own tests for better test coverage while contributing.

You might also like...

ApostropheCMS is a full-featured, open-source CMS built with Node.js that seeks to empower organizations by combining in-context editing and headless architecture in a full-stack JS environment.

ApostropheCMS ApostropheCMS is a full-featured, open source CMS built with Node.js that seeks to empower organizations by combining in-context editing

Jan 4, 2023

Business class content management for Node.js (plugins, server cluster management, data-driven pages)

PencilBlue A full featured Node.js CMS and blogging platform (plugins, server cluster management, data-driven pages) First and foremost: If at any poi

Dec 30, 2022

Minimalistic, lean & mean, node.js cms

Minimalistic, lean & mean, node.js cms

enduro.js Enduro is minimalistic, lean & mean, node.js cms. See more at enduro.js website Other repositories: Enduro • samples • Enduro admin • enduro

Dec 31, 2022

We.js, extensible Node.js MVC framework - CLI

We.js ;) We.js is a extensible node.js MVC framework For information and documentation see: http://wejs.org This repository (wejs/we) have the We.js C

Nov 10, 2022

AdminBro is an admin panel for apps written in node.js

Admin Bro AdminBro is An automatic admin interface which can be plugged into your application. You, as a developer, provide database models (like post

Jan 2, 2023

🎲 An exact-results dice-rolling library, for answering dice-related stat questions.

Roll.js 🎲 An exact-results dice-rolling library, for answering dice-related stat questions. I'm an avid D&D player, as is my brother, and we both lik

Dec 28, 2022

📕 The minimal and reddit like forum

📕 The minimal and reddit like forum

jeddit 📕 The minimal and reddit like forum Install git clone https://github.com/kyro95/jeddit.git cd reddit npm install npx prisma db push Setup Crea

Sep 1, 2022

Create flexible REST endpoints and controllers from Sequelize models in your Express app

Finale Create flexible REST endpoints and controllers from Sequelize models in your Express or Restify app. This project aims to be a Sequelize 4.x an

Oct 18, 2022

Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

May 18, 2022

Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

May 3, 2022

Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

Jan 3, 2023

A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose

By running a single command, you will get a production-ready Node.js app installed and fully configured on your machine. The app comes with many built-in features, such as authentication using JWT, request validation, unit and integration tests, continuous integration, docker support, API documentation, pagination, etc. For more details, check the features list below.

Dec 31, 2022

Node Express Template (NET.ts) - a small template project which help you to speed up the process of building RESTful API

Node Express Template (NET.ts) - a small template project which help you to speed up the process of building RESTful API

Jan 4, 2023

stackoverflow back end clone with node.js

stackoverflow back end clone with node.js

Stackoverflow clone with Node.js Run To run this project, download it to your computer and open it with a code editor. Open the .env file in the env f

Nov 20, 2022

This project shows how you can easily jwt protect your endpoints in web api apps built with node js.

This project shows how you can easily jwt protect your endpoints in web api apps built with node js.

JWT Protected NodeJs API This project shows how you can easily jwt protect your endpoints in web api apps built with node js. It is an easy and simple

Oct 19, 2021

Import ES Modules from the top StackOverflow answer to a question

Import ES Modules from the top StackOverflow answer to a question

StackOverflow Copilot Like GitHub Copilot, but worse! Imports the first codeblock of the first answer to a StackOverflow question as an ES Module Usag

Jan 18, 2022

ThinkMore Forum frontend build with Next.js, Typescript, Redux, Jest, Sass, MUI.

 ThinkMore Forum frontend build with Next.js, Typescript, Redux, Jest, Sass, MUI.

ThinkMoreForum-Frontend Website Desktop Mobile Front-end technology stack Next.js Redux Typescript MUI Axios Husky React testing-library Jest Eslint,

Dec 10, 2022

A Hacker News style forum, built on the Lens Protocol.

Refract A Hacker News style forum, built on the Lens Protocol This starter kit is composed of Next.js and Tailwind CSS, with RainbowKit, ethers, & wag

Dec 2, 2022

Fun way to share some of your (already) public StackOverflow user data to the internet.

Fun way to share some of your (already) public StackOverflow user data to the internet.

ProfileOverflow A simple app leveraging StackExchange APIs to show some StackOverflow accounts information. Made for fun during a weekend as practice.

Sep 14, 2022
Owner
Dhiman Seal
Showing skills off.
Dhiman Seal
Calipso is a simple NodeJS content management system based on Express, Connect & Mongoose.

Calipso Calipso is a simple NodeJS content management system, built along similar themes to Drupal and Wordpress, that is designed to be fast, flexibl

Clifton Cunningham 1.7k Dec 21, 2022
The most powerful headless CMS for Node.js — built with GraphQL and React

A scalable platform and CMS to build Node.js applications. schema => ({ GraphQL, AdminUI }) Keystone Next is a preview of the next major release of Ke

KeystoneJS 7.3k Dec 31, 2022
Reaction is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.

Reaction Commerce Reaction is a headless commerce platform built using Node.js, React, and GraphQL. It plays nicely with npm, Docker and Kubernetes. G

Reaction Commerce 11.9k Jan 3, 2023
👻 The #1 headless Node.js CMS for professional publishing

Ghost.org | Features | Showcase | Forum | Docs | Contributing | Twitter Love open source? We're hiring Node.js Engineers to work on Ghost full-time Th

Ghost 42.1k Jan 5, 2023
ApostropheCMS is a full-featured, open-source CMS built with Node.js that seeks to empower organizations by combining in-context editing and headless architecture in a full-stack JS environment.

ApostropheCMS ApostropheCMS is a full-featured, open source CMS built with Node.js that seeks to empower organizations by combining in-context editing

Apostrophe Technologies 3.9k Jan 4, 2023
We.js, extensible Node.js MVC framework - CLI

We.js ;) We.js is a extensible node.js MVC framework For information and documentation see: http://wejs.org This repository (wejs/we) have the We.js C

We.js 208 Nov 10, 2022
Javascript Content Management System running on Node.js

Cody CMS A Javascript Content Management System running on Node.js We finally took upon the task, we are happy to announce the transition to Express 4

Johan Coppieters 669 Oct 31, 2022
Business class content management for Node.js (plugins, server cluster management, data-driven pages)

PencilBlue A full featured Node.js CMS and blogging platform (plugins, server cluster management, data-driven pages) First and foremost: If at any poi

PencilBlue, LLC. 1.6k Dec 30, 2022
🚀 Open source Node.js Headless CMS to easily build customisable APIs

API creation made simple, secure and fast. The most advanced open-source headless CMS to build powerful APIs with no effort. Try live demo Strapi is a

strapi 50.8k Dec 27, 2022
👻 The #1 headless Node.js CMS for professional publishing

Ghost.org | Features | Showcase | Forum | Docs | Contributing | Twitter Love open source? We're hiring Node.js Engineers to work on Ghost full-time Th

Ghost 37k Apr 5, 2021