A simple todo app from Admin perspective. Admin can add, delete and update the todo items for selected user. Also Admin can track any change for any todo item (History Page).
- ReactJS Project built from scratch (No CRA)
- TypeScript
- Json-Server for Fake APIs
- i18next for localization
- Jest & React Testing Library
- Storybook for Components Documentation
- Sass for styling
- Axios
- classnames
- date-fns
- immer
- react-toastify
- yup
- react-icons
- react-helmet
Clone .env.example
and make two copies, one of them rename it to .env
and the other one to .env.production
.
The .env
file contains a key called BASE_URL
, to run the project locally you should update this key with this value "http://localhost:2022/api/"
- Prettier - Code formatter
- Jest Runner
- ESLint
- EditorConfig for VS Code
- PostCSS Language Support
- DotENV
-
NodeJS version is
16.14.x
-
Clone the source code from
https://github.com/hamed-farag/todo.git
-
In your terminal, navigate to the project directory and execute
npm install
-
After the previous step, execute
npm run api
to run json-server for fake APIs.4.1. Note: (APIs delayed by 500 ms, you can change it by updating delay value in
api
script at package.json) -
In a new terminal instance, run
npm run start
to run the project locally. -
Visit http://localhost:3000
- Run
npm run docs
and visit http://localhost:6006/
.
├── __test__ # all unit test
├── .storybook # contains all storybook needed setup files
├── .vscode # recommended extensions and default workspace setup
├── data # db.json and routes.json files that used by json-server
├── public # all assets needed in the project
├── screenshots
├── src
├── components # all reusable components
├── Business # all reusable components that server specific business
├── Users # users component is a dropdown list bonded with user data
├── UI
├── Dropdown
├── Empty
├── Label
├── Paginator
├── Spinner
├── Textbox
├── configs # all configs or shared configs
├── helpers
├── http
├── asyncer # manager for simplify the promise object
├── requester # wrapper on top of the http library (axios)
├── logger # simple manager contains logging method
├── i18n # internationalization setup
├── interfaces # interfaces for typescript
├── Layouts # parent component for the pages, the layout as a wrapper for the pages with some styles and components
├── Main
├── components # components used only for the Main Layout component
├── Pages
├── Home # the landing page that list the todo for the selected user
├── components # components used only for the Home page component
├── History
├── components # components used only for the Home page component
├── services # wrapper for http calls, also you can write here your business logic
├── stories # static files for the documentation tool (storybook)
├── styles # shared styles (7-1 sass architecture)
├── utils # small utilities for generating numbers, date, etc
├── app.styles.scss
├── App.tsx
├── index.tsx
Check SPECIFICATIONS.md file
npm run api
npm run start
npm run build
npm run lint
npm run docs
npm run build:docs
npm run test
npm run coverage
- Write more unit tests.
- Dark Theme
- Support Arabic & RTL