A full stack web application to manage Project ToDos. Frameworks, Libraries and Tools used:
Back-end: FastAPI with PostgreSQL database.
Front-end: React.js with Tailwind css and ShadCN Ui.
This project is done as a Hatio take home challenge.
- User Registration- Sign Up with unique credentials. Passwords are hashed before being stored in the database.
- User LogIn- Log in using your credentials. A JWT is returned for authorized access.
- Project Creation- Create a new Project with the Title you specify.
- View all Projects- In the Home page, you can view all the Projects you created.
- Detailed Project View- Click on a Project to see it's details including tasks(todos) for that project.
- Rename Project- Rename your Project from the Detailed Project View page.
- Todo Creation- Add a new Todo by providing a Description.
- Update Description- Change the Description for an existing Todo, then click Update.
- Update Status- Mark a ToDo as complete or pending using the checkbox, then click Update.
- ToDo Deletion- Delete a ToDo by clicking the Delete button.
- Export as Gist- Download a <project_name>.md file containing Summary of the Project.
To run the web app in your machine, download the code ZIP file or clone this repository.
Open a terminal and change directory to ToDo.
git clone https://github.com/notalanjoseph/ToDo.git
cd ToDo- Node.js: Download and install version 14 or newer from Nodejs.org.
- Install dependencies and Run the server using the commands:
The react app will be running at
cd ToDo-Pages npm install npm run devhttp://localhost:5173. Access it using a web browser.
- PostgreSQL: Download version 13 or newer from PostgreSQL.org. Install all the components during the installation.
- Password: During installation, set the database superuser(postgres) password as
root. If you want to use another password, define it in the .env file.database_password=your_database_superuser_password
- Access server: Open pgAdmin4 and click on
Serversfrom the left sidebar. Access the existing server (eg-PostgreSQL 18) using the password from before. - Create database: Right click on
Databases->Create->Database. Set Database name asToDoDB. Click Save. - Create tables: Right click on
ToDoDB->Query Tool. Copy & paste the below queries one by one and execute by pressingF5:CREATE TABLE IF NOT EXISTS public.users ( id serial NOT NULL, email character varying(25) COLLATE pg_catalog."default", password character varying COLLATE pg_catalog."default" NOT NULL, created_at timestamp with time zone NOT NULL DEFAULT now(), CONSTRAINT users_pkey PRIMARY KEY (id), CONSTRAINT users_email_key UNIQUE (email) ) TABLESPACE pg_default; ALTER TABLE IF EXISTS public.users OWNER to postgres;CREATE TABLE IF NOT EXISTS public.projects ( id serial NOT NULL, title character varying(25) COLLATE pg_catalog."default" NOT NULL, owner_id integer NOT NULL, todos integer[], created_at timestamp with time zone NOT NULL DEFAULT now(), CONSTRAINT projects_pkey PRIMARY KEY (id), CONSTRAINT projects_owners_fkey FOREIGN KEY (owner_id) REFERENCES public.users (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE ) TABLESPACE pg_default; ALTER TABLE IF EXISTS public.projects OWNER to postgres;CREATE TABLE IF NOT EXISTS public.todos ( id serial NOT NULL, description character varying(50) COLLATE pg_catalog."default" NOT NULL, status boolean NOT NULL DEFAULT false, created_at timestamp with time zone NOT NULL DEFAULT now(), updated_at timestamp with time zone NOT NULL DEFAULT now(), CONSTRAINT todos_pkey PRIMARY KEY (id) ) TABLESPACE pg_default; ALTER TABLE IF EXISTS public.todos OWNER to postgres;
- Python: Download and install a version between 3.8 and 3.11 from Python.org. Check Python & pip installation:
python --version pip --version
- Dependencies: Install the required Python packages listed in
requirements.txt:cd ToDo-App pip install -r requirements.txt - Start server: Run the FastAPI backend with uvicorn. The server will start on
http://localhost:8000.uvicorn app.main:app --reload
After starting the FastAPI server with uvicorn, go to http://127.0.0.1:8000/docs to see the request and response associated with each endpoints.