Skip to content

vikas5126/CSV-file-reader

Repository files navigation

Upload-CSV

  • Coding Ninjas Skill Test Assignment
Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing

About The Project

User can upload the csv files from their own system. the Application shows the data of CSV file in Tablel format and where user can also perform some operations. Tech Stack : HTML, CSS, JS, Node.js

Features :

  • Upload any csv file into the system (consider the delimiter to be a comma ‘ , ’) [If you don’t know what’s a csv, download the other file in this folder and take a look at it, then google a little more]
  • Display a list of all uploaded csv files
  • When the user selects a file, display all the data (with column headers) in a table on the page (front end)
  • There should be a search box which searches on the front end itself and displays the matching rows of the table only (empty search box displays all the data). (you can put a search on any one column)
  • DIFFERENT CSV FILES WITH DIFFERENT COLUMN HEADERS CAN BE UPLOADED,TABLE HEADERS SHOULD BE DYNAMIC
  • Sorting button (ascending and descending) for each column on the front end
  • Put a validation on the front end and server side on being able to upload only csv type of files
  • Pagination of the data displayed in the table to a max of 100 records per page

Built With

Here is the Technology Stack of this Application. which I have used to Built this Application.

  • MongoDB
  • Express
  • NodeJS
  • HTML
  • CSS

Getting Started

  • Clone this project
  • Start by installing npm and mongoDB if you don't have them already.
  • Run the Mongo Server.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/your_username_/Project-Name.git
  2. Install NPM packages
    npm install

Directory Structure and flow of The Code

This code follows MVC pattern and hence everything is differentiated and well managed:

Upload-CSV
    |-----assets
    |       |--- css
    |       |    |-- header.css
    |       |    |-- home.css
    |       |    |-- view.css
    |       |
    |       |--- js   
    |            |-- file.js
    |             
    |------ config
    |         └--- mongoose.js
    |------ controller
    |         └--- home.js
    |------ models
    |         └--- file.js
    |------ routes
    |         └--- index.js
    |------ uploads
    |         |--- files
    |------ views
    |         |--- _header.ejs
    |         |--- home.ejs
    |         |--- layout.js
    |         |--- view.ejs
    |         
    |------ .gitignore
    |------ index.js
    |------ package.json
    |------ package-lock.json
    └------ README.md

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published