This tiny twitter clone project must consist the following features:
- User registration & login
- Profile
- Follow other users
- Tweet
- Like each others tweet
To get started, we must ensure that we have Node.js as for NPM this usually is packaged along with Node.js, once the installation is complete, verify in your terminal:
node -v
npm -v
We will use Next.js as our React.js framework as it have batteries included out of the box. To get started, we can use the create-next-app CLI tool:
npm i create-next-app -g
Creating a Next.js app from the CLI includes a basic boilerplate with to save us some time:
create-next-app tweety
In this tutorial, VSCode is our text editor of choice so having that installed in your system is necessary.
I already setup an appropriate one, we just need to copy the settings.json
file inside the .vscode
directory:
mkdir .vscode && touch .vscode/settings.json
Make sure to copy and paste the following:
{
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"css.validate": false,
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false
}
Again, I already setup an appropriate one, we just need to copy the extensions.json
file inside the .vscode
directory:
touch .vscode/extensions.json
Make sure to copy and paste the following:
{
"recommendations": [
"redhat.vscode-xml",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"hex-ci.stylelint-plus",
"ofhumanbondage.react-proptypes-intellisense",
"dsznajder.es7-react-js-snippets",
"visualstudioexptteam.vscodeintellicode"
]
}
💡 Then, we must restart VSCode, and when a "This workspace has extension recommendations." message pops up, just click "Install All"
For chrome users: https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en
For firefox users: https://addons.mozilla.org/en-US/firefox/addon/react-devtools/
Install the MySQL server: https://dev.mysql.com/downloads/mysql/