JumpNote
About this project
JumpNote is a Simple, Quick, Easy to use, Note taking app that “automagically” backups everything to a server. Using the hottest new technology we built JumpNote using React Native for the app frontend, Node.js for the backend server magic, and used Mongodb to implement our database.
How to join and understand this project
Getting started
Download
-
You can download latest installable version of JumpNote for Windows, macOS and Linux.
-
git clone the repo
git clone https://github.com/SRJC-Computer-Science-Club/jumpnotes.git
Software Installation
Follow these instructions to get everything you need installed.
- Install Node.js
-
Windows installation here Node.js on Windows
-
Mac installation here Node.js on Windows
-
Ubuntu installation here Node.js on Windows
-
Install MongoDB
Setup/Run Server
After you have finished installing all the software correctly you can now clone the repo into a folder of your choosing and run the server.
To get started:
- open up cmd( command prompt ) for windows, terminal for Mac and Linux
- Download This file
- Go to you Downloads folder
- Unzip
jumpnotes-master.zip Clone this repository git clone https://github.com/SRJC-Computer-Science-Club/jumpnotes.git
- If
git
is not installed it can be download here
Go into the repository > cd jumpnotes-master
Install dependencies
> npm install
Start Mongodb server
npm start_mongdb
- if npm start_mongdb does not work for you try running
mongod –dbpath “data”
Run the app
> npm start
How It Works ——-
How the data flows from server and clients
Client - The notes app has a open connection to the server that is located at the address http://localhost:3000
on the physical server.
When the Client request to the server the server sends back a a JSON object like this one
Example
{
"id": 1,
"title": "My first Awesome Note!",
"noteText": "Idea for greate new book title Brave New World"
}
Server - The get and processed the json object like above, and sends them to the mongodb
server ( located at the address mongodb://localhost:27017/Notes
) to be added to the database.
The server **saves ** data to the database by sending a json object that is saved by issuing the db.collection.insert()
an example would look like
db.collection.insert(
{
"id": 1,
"title": "My first Awesome Note!",
"noteText": "Idea book title Brave New World"
}
)
Example in calling from Javascript
Here is what it looks like to call db.collection.insert() inside the Server (note this doesnt work outside the server app)
var MongoClient = require(‘mongodb’).MongoClient; /Data to be saved in database/
// The Name of the database
//|
//V
var URL = "mongodb://localhost:27017/Notes";
var DATA = {
"title": "My first Awesome Note!",
"noteText": "Idea book title Brave New World"
}
MongoClient.connect(URL, function (err, db) {
// select the name of the database
//|
//V
db.collection('Notes', function (err, collection) {
collection.insert( DATA );
db.close();
});
});
Understating Node.js ———————
Learn the basics of Node.ls, Express.js —————Click here
Built with
-
Node.js In this project we used the following frameworks, library’s and software.
- MongoDB : is a free and open-source cross-platform document-oriented database
- Node.js : an open-source, cross-platform JavaScript run-time environment for executing JavaScript code server-side.
- Express : is a minimal and flexible Node.js web application framework
- mongodb : is an MongoDB driver for Node.js. Provides a high-level API on top of mongodb-core that is meant for end users.
- Socket.io : creates real-time bidirectional event-based communication in node.js
- React Native : open-source framework allowing you to build fully native apps in JavaScript
Licence
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.