As others have pointed out NoSQL is a generic term that refers to any alternative to traditional relational databases in which data is placed in tables and data schema is carefully designed before the database is built.
You mentioned Mongo in your question... MongoDB is schema-less. What you can do is create your own class that interacts with an instance of a Mongo Database and in that class you define rules that the data needs to adhere to.
If you are using node.js, you can install Mongoose which allows you to interact with database in object oriented style by providing a straight-forward, schema-based solution to model your data.
Here is a very simple example on how you would define a chat schema in Mongoose, it is not meant to be a complete schema, it is just a start which hopefully will get you going in implementing what you need:
var chatSchema = new Schema({
chatSession: { type: Number, index: true },
user: { type: String, default: 'anonymous' },
chatLineText: { type: String },
dateTime: { type: Date, default: Date.now },
});
var chatModel = mongoose.model('Chat', chatSchema);
var chatLine1 = new chatModel({
chatSession: '2133123',
user: 'someUserName',
chatLineText: 'Hello yuvi!'
});
chatLine1.save(function (err, chatLine) {
if (err) console.log(err);
else console.log('following chatLine was saved:', chatLine);