Welcome to my Blog App, where you can see the latest post or read all of them, and also write comments.
Demo at: blog-app-liard.vercel.app
App created using Next.js 11, TypeScript, styled-components and for testing Jest. Thank you for using my app.
Note: To run this project be sure to have a Node version installed that is 12.x or higher
- Installation
- Future Work
- Contributing
- License
- Folder Structure
- Environment variables
- Available Scripts
To use this app, first clone from GitHub via 'git clone https://github.com/katiaipduarte/blog-app.git' at your terminal, cd
to the new directory, then run npm run install:npm
. Before running this project, you will need to create a .env.local
file, with the same env as the ones in the .env.example
. At last, run npm run dev
to launch your http server.
For this project to run you need to run the API via json-server https://github.com/LetsGetChecked/developer-challenge-api.
[ ] Add more unit tests and e2e ones
[ ] Add page transition loader
[ ] Add authentication
[ ] Add possibility to write posts
Bug reports and pull requests are welcome on GitHub at https://github.com/katiaipduarte/blog-app. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The code is available as open source under the terms of the MIT License.
blog-app/
.jest/
components/
common/
templates/
ui/
constants/
interfaces/
lib/
context/
hooks/
seo/
pages/
public/
styles/
utils/
For the project to build, these files must exist with exact filenames:
.jest
contains a single file for the setup of the plugins/npm packages used in the unit tests.components
is the folder that houses all the components used. It's divided for now into 5 modules.common
: components that are used all the time when we render a page.templates
: pages templates.ui
: small components ui components with or without logic.
constants
is the folder with all the enums or const objects used in the components.interfaces
is the folder with all the interfaces/type files used in the components.lib
is the folder for some hooks, SEO and context provider.pages
is the folder that contains the files with the initial logic used for each route.public
the folder only contains the favicon images.style
is the folder with reset, themes and any other style rules shared by all components.utils
is the folder with helper functions.
NEXT_PUBLIC_APP_URL=
NEXT_PUBLIC_API_ENDPOINT=
Clear installation of all node modules.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
Runs the app in the production mode.
Open http://localhost to view it in the browser.
next-unused is used to find all the unused files in the project.
Automatic linting, with rules to work with TypeScript and React. The node_modules
and e2e
folders are not included.
This is runned each time you do a commit and a push it to your branch.
For more information see the ESLint documentation.
Command to format the code according to the rules that can be found in .prettierrc
. The node_modules
and e2e
folders is not included.
This will be automatically run each time you do a commit.
For more information see the Prettier documentation.
Runs all the tests founded.
See the section about running tests for more information.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Launches the test runner in the interactive watch mode and shows a report with the code coverage for each component.
See the section about running tests for more information.