NICOLÁS BOTTARINI
Social Network

Social Network

Build an X-like social network, from the console to the web and mobile

Level:Expert
Duration:Long
Topics:
TDDClean CodeOOPDesignSOLIDOutside-InDDDArchitecture

Implement a console-based social networking application (similar to X) satisfying the scenarios below.

This is the final project of the learning path: a complete application where you apply everything together.

Scenarios

Signup & Login

Users can sign up and log in.

Commands:

signup [@user] [password]
login [@user] [password]
logout

Examples:

> signup @alice 1234
> signup @bob 5678
> signup @alice 1234
ERROR: User @alice already exists
> login @alice 777
ERROR: Invalid credentials for @alice
> login @alice 1234
Logged in as @alice!
@alice> login @bob 5678
Logged in as @bob!
@bob> logout
Logged out!
> asdasd
ERROR: Invalid command asdasd
> login @charlie 1234
ERROR: Invalid credentials for @charlie  // We hide the fact that charlie doesn't exist

Posting

Users can publish messages to a personal timeline.

Commands:

post [message]

Examples:

@alice> post I love the weather today
@bob> post Damn! We lost!
@bob> post Good game though.
@alice> post
ERROR: Empty message
> post some message
ERROR: User must be logged in to post messages

Reading

Users can view other users' timelines.

Commands:

read [@user]

Examples:

@bob> read @alice
- I love the weather today (5 minutes ago)
@charlie> read @bob
- Good game though. (1 minute ago)
- Damn! We lost! (2 minutes ago)
@charlie> read @bobbb
ERROR: Unknown user @bobbb
@charlie> read
ERROR: Must specify a user

Following

Users can subscribe to other users' timelines and view an aggregated list of all subscriptions.

Commands:

follow [@user]
unfollow [@user]
following [@user]
followers [@user]
wall

Examples:

@alice> follow @bob
@alice> follow @charlie
@alice> wall
- @charlie: I'm in New York today! Does anyone want to have a coffee? (2 seconds ago)
- @bob: Good game though. (1 minute ago)
- @bob: Damn! We lost! (2 minutes ago)
@alice> follow @charlie
ERROR: already following @charlie
@alice> following @alice
- @bob
- @charlie
@alice> followers @bob
- @alice
@alice> unfollow @bob
@alice> wall
- @charlie: I'm in New York today! Does anyone want to have a coffee? (2 seconds ago)

Iterations

In the apprenticeship program the project grew in stages, on top of the same domain:

  1. Console application.
  2. Web: an API and a frontend in React.
  3. Persistence, with database migrations and integration tests.
  4. Deployment to the cloud.
  5. Mobile application.

Credits