Here is a detailed README.md
for your PriHub Cognitive Disabilities Platform, including an explanation of the main code sequences and project structure:
PriHub is a web platform designed to support individuals with cognitive disabilities by providing accessible resources, community support, and interactive tools. The platform emphasizes accessibility, clear communication, and user empowerment.
- Features
- Project Structure
- Setup & Installation
- Main Code Sequences & Architecture
- Accessibility & Cognitive Support
- Authentication
- Chatbot Integration
- Customization
- License
- Accessible UI: High-contrast, dyslexia-friendly, and keyboard-navigable interface.
- Authentication: Email/password and social login (Google, Facebook, GitHub) via Firebase.
- AI Chatbot: Context-aware assistant powered by OpenAI, tailored for cognitive accessibility.
- Cognitive Support Tools: Text-to-speech, simplified text, high-contrast mode, focus mode, reminders, and notes.
- Resource Directory: Curated links, educational materials, and support group information.
- Responsive Design: Mobile-friendly navigation and layouts.
/
├── index.html # Main HTML file (UI, modals, navigation)
├── stylesheet.css # All styles (responsive, accessibility, theming)
├── main.js # UI logic, accessibility, notifications, utilities
├── auth.js # Authentication logic (Firebase)
├── chatbot.js # Chatbot UI and OpenAI integration
├── cognitive-support.js # Cognitive support tools (TTS, notes, reminders)
├── server.js # Node.js backend (Express, OpenAI API)
├── package.json # Node.js dependencies and scripts
└── .env # (Not included) Your OpenAI API key
git clone https://github.com/yourusername/prihub-cognitive-disabilities-platform.git
cd prihub-cognitive-disabilities-platform
npm install
Create a .env
file in the root directory:
OPENAI_API_KEY=your_openai_api_key_here
npm start
The app will be available at [https://soft-sunflower-5f4497.netlify.app/)].
- Layout: Header with navigation, main content sections (Home, About, Conditions, Support, Resources, Contact), modals for login/signup/forgot password.
- Accessibility: Skip links, ARIA labels, semantic HTML, responsive design.
- Scripts: Loads
main.js
,auth.js
,chatbot.js
, andcognitive-support.js
.
- Theming: Uses CSS variables for colors, high-contrast, and dyslexia-friendly options.
- Responsive: Media queries for mobile navigation and layouts.
- Components: Styles for modals, buttons, notifications, chatbot, and cognitive support tools.
- UI Enhancements: Smooth scrolling, scroll-to-top, animated typing, and emergency support button.
- Accessibility: Text size controls, reading guide, ARIA attributes, and keyboard navigation.
- Notifications: Shows feedback for user actions.
- Form Validation: Client-side validation for all forms.
- Firebase Auth: Handles login, signup, password reset, and social logins.
- UI Updates: Dynamically updates the navbar based on authentication state.
- Notifications: Shows success/error messages for all auth actions.
- Chat UI: Floating chat icon, expandable chat window, message log.
- OpenAI Integration: Sends user messages to the backend, receives and displays AI responses.
- Accessibility: Keyboard navigation, font size controls, text-to-speech for bot replies.
- Support Panel: Floating button opens a panel with tools for reading, visual adjustments, navigation, and memory aids.
- Text-to-Speech: Reads page content aloud.
- Simplified Text: Toggles a simplified text mode.
- High Contrast & Focus Mode: Visual adjustments for easier reading.
- Notes & Reminders: Quick notes and medication reminders with local storage.
- Express Server: Serves static files and provides API endpoints.
- OpenAI Integration:
/api/chat
endpoint receives chat messages, maintains session context, and returns AI responses. - Conversation Management: Keeps a short history per session for context.
- Health Check:
/api/health
endpoint for uptime monitoring.
- Dependencies:
express
,openai
,dotenv
for backend;nodemon
for development.
- Skip Links: Jump directly to main content.
- ARIA Labels: All interactive elements are labeled for screen readers.
- Keyboard Navigation: All features are accessible via keyboard.
- Text-to-Speech: Reads content and chatbot replies aloud.
- High Contrast & Dyslexia Font: Toggle for users with visual/cognitive needs.
- Simplified Text: Reduces reading complexity for easier comprehension.
- Reminders & Notes: Helps users remember important tasks.
- Email/Password: Standard registration and login.
- Social Login: Google, Facebook, and GitHub via Firebase.
- Password Reset: Users can request a reset link.
- Session Management: UI updates based on login state.
- AI Assistant: Powered by OpenAI, tailored for cognitive accessibility.
- Contextual: Maintains short-term conversation history for relevant responses.
- Accessible: Keyboard, screen reader, and TTS support.
- Theming: Easily adjust colors and fonts in
stylesheet.css
. - Content: Update resources, support info, and chatbot prompts in HTML/JS.
- Backend: Swap out OpenAI or add more endpoints as needed.
For questions, feedback, or accessibility suggestions, please use the contact form on the site or email the developer.
PriHub – Empowering individuals with cognitive disabilities through technology and community.
Great! Here’s how you can expand your README with example screenshots and deployment instructions. You can copy and paste this into your README and add your own screenshots as needed.
This welcoming the about Cognitive Information for the futuristic Conditions & Scenario.
Simple, accessible authentication modals with social login options.
AI-powered assistant for support, resources, and guidance.
To define & redirect all type of disabilities with specific Information Provider
Floating panel with text-to-speech, high contrast, focus mode, reminders, and notes.
For book one to one session & appointment with the doctors.
Tip:
Place your screenshots in ascreenshots/
folder in your project root.
Update the image paths above if you use a different folder or filenames.
- Clone the repository:
git clone https://github.com/yourusername/prihub-cognitive-disabilities-platform.git cd prihub-cognitive-disabilities-platform
- Install dependencies:
npm install
- Set up environment variables:
- Create a
.env
file in the root directory:OPENAI_API_KEY=your_openai_api_key_here
- (Optional) Set
PORT=your_port
if you want a port other than 3000.
- Create a
- Start the server:
The app will be available at http://localhost:3000.
npm start
- Push your code to GitHub or another git provider.
- Create a new web service on your chosen platform.
- Set environment variables:
OPENAI_API_KEY
(required)PORT
(optional)
- Deploy!
The platform will install dependencies and start your server usingnpm start
.
- Go to Firebase Console.
- Create a new project or use an existing one.
- Enable Authentication (Email/Password, Google, Facebook, GitHub as needed).
- Copy your Firebase config into the
<script>
block inindex.html
.
- Add a custom domain: Configure your DNS and update your cloud platform settings.
- HTTPS: Most cloud platforms provide HTTPS by default.
- Analytics: Add Google Analytics or similar for usage tracking.
- Accessibility Audits: Use tools like Lighthouse or axe to further improve accessibility.
If you need help with any specific deployment platform, feel free to connect with me on: Pranjal Khandelwal LinkedIn: https://www.linkedin.com/in/pranjal-khandelwal-1a46682a4/ GitHub: https://github.com/golu19102003 Twitter: https://x.com/Pranjal76009498 Facebook: https://www.facebook.com/profile.php?id=100095370905135 Instagram: https://www.instagram.com/pranjal19102003_2.0/