Toggle Sidebar   Previous Lesson Complete and Continue  

  Plan & Design The Application

Before we jump into the weeds and start coding, let's make sure we have a big picture of what we want to build and the different components that will be needed.

In this section, we'll go over each portion of the application and discuss what needs to be built.

Components Of The Application

Broadly speaking, your application will consist of four major components and/or features:

  1. A frontend iOS App (or web app may be added later) where users will interact, view tweets and other content.
  2. A REST API that will fulfill requests for getting data from a database.
  3. An admin control panel website where you can create/edit tweets.
  4. A MongoDB database that stores the data for users, tweets, etc… and the username/password credentials for authenticating the admin user.

Let's go through each of those components one by one and list out what we'll need to build for each one.

Frontend iOS Application

iOS app will be what your users interact with.

The app will be built using SwiftUI, which is a widely used UI framework for building production-ready iOS applications.

REST API

Alongside the iOS app, we'll also need to build a REST API application that takes requests from the iOS app, retrieves the necessary data from the database, and sends it back to the app to be displayed to users.

The REST API will be built using Node.js and the Express.js framework. Express has a robust set of features that will help us build the REST API both quickly and effectively.

In essence, the REST API will be a Node.js application that sits and listens for requests to get certain types of data. When it gets a request from the iOS app, for let's say the app wants to retrieve a tweet, it will interact directly with the MongoDB database and send the tweet data back to the app to be displayed for the user.

MongoDB Database

For the database, we're going to use the Atlas service to create a MongoDB database in the cloud.

MongoDB is a document-based and non-SQL database that is great for building modern applications. And Atlas will allow us to quickly get a database running in the cloud, will handle all the security and headache-inducing aspects of managing a database, and has a generous free-tier for you to use as well.

It will be used to store both tweet data and user data used for authenticating requests made by the application.

The iOS app will pull data from the database and display it for users. The admin application will both read and update the data inside the database.

Admin

The admin website will also be built using Node.jsExpress.js and EJS (ejs is a simple templating language that lets you generate HTML markup with plain JavaScript so that we can easily build the admin interface).

Also, we'll add some authentication security measures to the admin website. The entire website will be password protected by creating a login page where you can gain access by using email and password credentials. And each functionality in the list above will require authentication before any changes to the database can occur.

This will ensure that you're the only one who can make changes to your database.

Deploying The Application

In this course, we'll also walk through how to deploy your application to production.

For serving your applications, we'll use DigitalOcean. Both API and Admin websites will be hosted on the same server.

Through that process, you'll learn how to deploy a production-ready application.

Complete and Continue