Giter Site home page Giter Site logo

alphavio / krishi-kalyan Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 4.0 312 KB

This is a website for the welfare of the farmers, this is done by cutting the middle men and allowing farmers to sell directly to the customers.

Home Page: https://krishi-kalyan.herokuapp.com/

JavaScript 35.51% SCSS 4.75% EJS 47.88% CSS 11.86%
wociiitkalyani dsciiitkalyani

krishi-kalyan's Introduction

Krishi-Kalyan

Tech Stack-

  • HTML
  • CSS
  • EJS template engine
  • Node JS
  • Express JS
  • Mongoose

Environment Setup-

  • Drop a โญ on the GitHub repository.




  • Robo 3T is a desktop graphical user interface (GUI) for Mongo DB. It can help to skip running all the Mongo DB commands manually every time we want to access the data. Download Robo 3T (optional)

  • Clone the repository by running command
git clone https://github.com/ <your user-name> /Krishi-Kalyan.git

in your git bash.

  • Run command cd Krishi-Kalyan.

  • Run this command to install all dependencies for the project.
npm install

  • Run this command on your terminal/ bash to start the Mongo server on port 27017(default).
mongod

  • Run this command to start the project on local host 3000.
node app

  • Open link to view the website in your browser window if it doesn't open automatically.
http://localhost:3000/

  • You can learn more about EJS template engine and its syntax to know how we can use it inside our HTML using the documentation

  • Now you are all set to use this project.

Some useful Mongo DB commands if you are using the terminal instead of the GUI-

show dbs
use db <db name>
show collections
<db name> .find()

Overview

This project aims to make business easy for farmers. It's a comprehensive virtual marketplace which allows farmers to list the goods and their prices, following Government regulations and practices such as MSP. In turn, prospective buyers can directly approach them to purchase their goods.

Features

  • Multi-lingual interface with support for native languages
  • Simple chat system to allow one-one interaction between farmers and customers

Development

  • The project follows an engineered structure for both backend and frontend development. The initial entry point is by default index.js

  • Each directory has a package.json file, which is primarily to make importing various files easy throughout the app.

  • The project utilises SCSS for custom styling purposes and Bootstrap (v4.3) for it's primary styling purposes.

  • The project contains the following scripts:

    • npm run dev: This script runs the app in development mode. The app is run on the nodemon package for this.
    • npm start: This script runs the app with the node command.

    Guidelines

    • Each module has a particular directory named after it, which contains the route files for the same. Example: authentication module has a directory named authentication/ which contains login.js and signup.js
    • The usage of each directory is listed below for ease of navigation and understanding.

    routes/

    • This directory contains all the routes for get and post methods.

    models/

    • This directory contains all the Mongoose models and schemas.

    views/

    • This directory contains all the EJS pages of the app.
    • head.ejs: This file contains all the common tags and meta information for a webpage.
    • scripts.ejs: This file contains all the common scripts for a webpage.

    public/

    • This directory contains all the miscellaneous scripts and stylesheets which are used in the front-end. These scripts are commonly used all across the app.
    • css/_vars.scss: This file contains all the color and font variables that are used in the app.
    • css/_common.scss: This file contains all the common SCSS properties that are used throughout the app.
    • js/helper.js: This file contains a class named Helper which contains several miscellaneous functions used repeatedly in the app. Import and use the class by the following way:
    import Helper from 'misc/helper'
    const helper = new Helper()
    
      - ```helper.parseTime(x)```: Returns a string in the format of DD/MM/YYYY 00:00 (IST) for any epoch timestamp passed as the variable ```x```
      - ```helper.reduceString(string, threshold)```: Returns a string which is trimmed down to a particular ```threshold``` of words. Example, if ```threshold``` is passed as ```50```, the ```string``` that is passed into the function will be cut down to 50 words. If ```string``` is less than 50 words in length, it will return the string as it is.
    

krishi-kalyan's People

Contributors

dependabot-preview[bot] avatar pranav016 avatar vishvajeet-y avatar

Stargazers

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