Ujjalzaman / Doctor-Appointment

A doctor appointment can be obtained by a patient through this website.
https://doctoroncall-bd.netlify.app/
246 stars 161 forks source link

Documentation : Enhance Project Setup Process #51

Open HEMANTHMOHANDOSS opened 9 months ago

HEMANTHMOHANDOSS commented 9 months ago

How to change the Default Email and Password in cloned Application

HEMANTHMOHANDOSS commented 9 months ago

while login its always coming like Email already exists

HEMANTHMOHANDOSS commented 9 months ago

the Application causing Errors in certain areas

Ujjalzaman commented 9 months ago

erta

Please give me a screenshot of the error that your facing.

Ujjalzaman commented 9 months ago

How to change the Default Email and Password in the cloned Application

To Change the default email and password, you have to change the .env file. for more please follow README.md documentation.

HEMANTHMOHANDOSS commented 9 months ago

kindly guide me to complete this Application sir

HEMANTHMOHANDOSS commented 9 months ago

sir I attached Screenshots in your mail as i have problem to attach in this

HEMANTHMOHANDOSS commented 9 months ago

IMG_20240224_090504 IMG_20240224_090544 IMG_20240224_090504

HEMANTHMOHANDOSS commented 9 months ago

IMG-20240224-WA0005 IMG-20240224-WA0001 IMG-20240224-WA0006

Ujjalzaman commented 9 months ago

Hi @HEMANTHMOHANDOSS Thank you for finding these bugs. I have already fixed appointment and login-related bugs. You can also get email notifications while getting appointments.

HEMANTHMOHANDOSS commented 9 months ago

sir I have one another doubt what are other changes i want to do for my clonned project. if you give like a step it would be very useful for kindly give with file path which i want to make changes.

HEMANTHMOHANDOSS commented 9 months ago

sir I am facing the same issues and Something went wrong Error

HEMANTHMOHANDOSS commented 9 months ago

what I want to do to build this clone

HEMANTHMOHANDOSS commented 9 months ago

i liked your project and i want to do this clone but i cant able to do how to achive this for my project

Ujjalzaman commented 9 months ago

I have Added documentation setup_project.txt

Setup Documentation

## Clone The Project
git clone https://github.com/Ujjalzaman/Doctor-Appointment.git

### Install Frontend
cd Doctor-Appointment
- npm install
- npm start

### Install Backend
cd api
- npm install

### Setup Database
1. Rename .env.example to .env (remove .example).
2. Create a PostgreSQL Database (Railway if you don't have one installed locally):
   - Create an account at https://railway.app/.
   - Navigate to the New Section > Database > Add PostgreSQL.
   - Select your created database and go to the Variables tab.
   - Copy DATABASE_PRIVATE_URL.
   - Paste the database URL into the .env file.

### Install Prisma
- npm install -g prisma
- npx prisma generate
- npx prisma migrate dev

### Setup Google App Password (For Email Notification)
1. Go to Google Account settings at https://myaccount.google.com/security?hl=en.
2. Navigate to Security > 2-Step Verification.
3. Scroll to the bottom of the page and find App passwords.
4. Select your project name and copy the generated password.
5. Paste the app password into .env as EMAIL_PASS.

### Setup Cloudinary to Upload Image
1. Create a Cloudinary Account at https://cloudinary.com/.
2. Login to your Cloudinary Account and copy all the credentials (e.g., Cloud name, API key, API secret).
3. Paste those credentials into the .env file.

### Start Backend
npm start

Happy coding! 🚀
HEMANTHMOHANDOSS commented 9 months ago

sir i could able to find .env.example file can you able to provide any path

HEMANTHMOHANDOSS commented 9 months ago

I able to view two env files env production and env development

Ujjalzaman commented 9 months ago

@HEMANTHMOHANDOSS Please Read Carefully the documentation that I have written.

1): .env.example file - this file you will find in /api directory (backend). remove .example. (only .env). and update with your database link.

2): .env.production & .env.development will be found on the client site (no need to do anything here).

HEMANTHMOHANDOSS commented 9 months ago

when prisma commands are pasted in the terminal

HEMANTHMOHANDOSS commented 9 months ago

with your help today i belive that i will complete this project thank you sir for your wonderful support

HEMANTHMOHANDOSS commented 9 months ago

FORMAT FOR VARIABLE NAMES CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret sir for cloudinary like this is correct ?

HEMANTHMOHANDOSS commented 9 months ago

SIR LIKE THIS COMING

Screenshot (779)

HEMANTHMOHANDOSS commented 9 months ago

IN POSTGRE ALSO I DONE AS YOU TOLD SIR BUT COMING LIKE ABOVE ERROR SIR WHAT I WANT TO DO

Screenshot (780)

HEMANTHMOHANDOSS commented 9 months ago

npx prisma migrate dev

Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": PostgreSQL database "railway", schema "public" at "postgres.railway.internal:5432"

Error: P1001: Can't reach database server at postgres.railway.internal:5432

Please make sure your database server is running at postgres.railway.internal:5432.

HEMANTHMOHANDOSS commented 9 months ago

MY URL IN THE CORRECT FORMAT ONLY SIR AS I SHOWED BELOW

DATABASE_URL=postgresql://user:password@postgres.railway.internal:5432/database

HEMANTHMOHANDOSS commented 9 months ago

sir i am almost there to complete kindly help me to resolve this ERRORS

Ujjalzaman commented 9 months ago

You are almost done. Please send me message me at skype ujjal.zaman Also im available on discord ujjalzaman

HEMANTHMOHANDOSS commented 9 months ago

ok sir kindly support me how to solve i message you in discord

HEMANTHMOHANDOSS commented 9 months ago

sir i sended you in discord hemanthm1044

70shakeel commented 9 months ago

using railway, created account, created new project, created database postgres, pasted database private url from railway to .env and the command npx prisma migrate dev gives error can't reach database server aattempts "postgres.railway.internal:5432" please make sure the server is running at home "postgres.railway.internal:5432"

70shakeel commented 9 months ago

using railway, created account, created new project, created database postgres, pasted database private url from railway to .env and the command npx prisma migrate dev gives error can't reach database server aattempts "postgres.railway.internal:5432" please make sure the server is running at home "postgres.railway.internal:5432"

Solved by using prisma postgres project and using database url instead of database private url as mentioned in project docs

70shakeel commented 9 months ago

image now having this CORS error.

70shakeel commented 9 months ago

image now having this CORS error.

Solved, macbook uses port 5000 for airplay, turned airplay off in system settings and now the server works without CORS error

Ujjalzaman commented 9 months ago

Hi @70shakeel I'm delighted to hear that your problem has been resolved. Happy Coding!

70shakeel commented 9 months ago

image The appointment can be scheduled for the same time multiple times and also you can not choose the doctor who you want to see.

Ujjalzaman commented 8 months ago

image The appointment can be scheduled for the same time multiple times and also you can not choose the doctor who you want to see.

@70shakeel . -> You cannot set an appointment with the doctor if the doctor has not set an appointment time. (can't set an appointment with the selected doctor. that means the doctor is not available). the logic is Implemented I will simplify it on the client side as well.

harshsingh510 commented 7 months ago

Screenshot (107) Hi Ujjal, this is the error I am getting on click on doctors tab in navbar, I have added a doctor and doctor has set appointment time also. can you help me up with this.

swite2331 commented 7 months ago

hi harshsingh510 if go SearchContent.jsx line 68 {truncate(data?.clinicAddress, 20)} change it to {data?.clinicAddress ? truncate(data?.clinicAddress, 20) : 'NA'} will fix your problem