hisaac.net

Solo Project Day Two: Getting Something on the Page

My scope was approved at the end of yesterday, so today I got to begin actual coding. It feels really good to start wrapping my brain around the concept of this app, and to start visualizing the whole project.

I began the day by thinking through my database structure. I’ve decided to use MongoDB for the project, and have two schemas I’ll be using. The main schema:

var userSchema = new Schema({
	email: String,
	name: String,
	username: String,
	date_joined: { type: Date, default: Date.now },
	tweets: { [tweet] }
});

And a sub-document schema for the tweets themselves:

var tweetSchema = new Schema({
	twitter_id: { type: String, default: "" },
	url: { type: String, default: "" },
	posted: { type: Boolean, default: false },
	date_posted: Date,
	date_created: { type: Date, default: Date.now },
	hashtags: { type: String, default: "" },
	mentions: { type: String, default: "" },
	hearts: { type: Number, default: 0 },
	retweets: { type: Number, default: 0 },
	tweet: { type: String, default: "" }
});

(Normally I would use single-quotes in my JavaScript, but I had some issues with single-quotes within the tweet text escaping the string definition. I decided to use double-quotes, as they are less likely to be used in a tweet.)

These schemas are based off of assumptions about what the Twitter API will likely return to me, but I haven’t yet begun building that component of the application, so it will likely change. Until then, I’ve populated my database with some test data based off of these schemas, and will continue testing using that.

Next, I began building my Angular routes in my client-side JavaScript to be able to display different content based on what “page” the user is on. I also build static Login and Logout pages to be used in testing.

I also dug into some simple CSS styling using Skeleton, and copying some of Bootstrap’s button styles into them.

Lastly, we had a brief lecture on JavaScript debuggers. I haven’t looked into it much, but I definitely plan to use one soon.

Today’s Research

Screenshots

Login Page Login Page

Settings Page] Settings Page

Tweet Page Tweet Page

Post Metadata
date Dec 6th, 2016
tags crow, projects, twitter, webdev