Welcome to the Sundar Clinic Website repository. This website is built using modern web technologies and serves as an online platform for Sundar Clinic, a healthcare provider located in Pappanchatiram on the Bangalore-Chennai highway. The website offers information about the clinic, its services, team members, FAQs, and more.
- Next.js 13
- App Router
- Sanity CMS
- Tailwind CSS
- Shadcn UI
- Material-UI Image List Component
- Zod
- Nodemailer
- Axios
- Landing
- About
- Gallery
- Contact
- Terms and Conditions
- Privacy Policy
- Legal Page
- Dynamic content management through Sanity CMS for FAQs, team members, testimonials, and gallery images.
- Contact form with data collection and email notification using Nodemailer, Axios, and Next.js API routes.
- Responsive design with Tailwind CSS and Shadcn UI for a clean and intuitive user experience.
- Clone the repository:
git clone https://github.com/Sundar-Clinic/Main-Website.git - Install dependencies:
npm installorpnpm install - Create
.env.localwith reference to.env.samplevariables before running the app (Sanity and gmail app password will be required) - Start the development server:
npm run dev
This project uses next-intl with App Router and locale-based routes.
- Locale routing is configured in:
i18n/i18n.ts(localesarray +getRequestConfigloading messages).lib/routing.ts(defineRouting+createSharedPathnamesNavigation).middleware.ts(matcher and default locale routing).
- Translation messages live in
locales/*.json. - Providers are configured in
app/[locale]/layout.tsxviaNextIntlClientProvider.
- Add a new locale JSON file in
locales/(e.g.,locales/es.json). - Register the locale in:
i18n/i18n.ts→export const locales = ['en', 'ta', 'hi', 'es'].lib/routing.ts→locales: ['en', 'ta', 'hi', 'es'].middleware.ts→ update the matcher to include the new locale (e.g.,/(en|ta|hi|es)/:path*).
- Add translations for the new locale by mirroring keys from
locales/en.json.
Client components
import { useTranslations } from 'next-intl';
const t = useTranslations('pages.home');
return <h1>{t('hero.title')}</h1>;Server components/pages
import { getTranslations, unstable_setRequestLocale } from 'next-intl/server';
export default async function Page({ params: { locale } }) {
unstable_setRequestLocale(locale);
const t = await getTranslations({ locale, namespace: 'pages.home' });
return <h1>{t('hero.title')}</h1>;
}- Add the new key to
locales/en.json(and copy the key to other locale files). - Reference the key with
useTranslations/getTranslationsin the component or page.
This project uses Cypress for both end-to-end and component tests.
- Run end-to-end tests (headless):
npm run test:e2e - Open Cypress for end-to-end tests (interactive):
npm run e2e - Run component tests (headless):
npm run test:component - Open Cypress for component tests (interactive):
npm run component - Open Cypress Test Runner (choose e2e or component):
npm run cypress:open
If you would like to contribute to this project, please read our Contributing Guidelines for more information.
This project is licensed under the MIT License.
Many people have contacted us asking if they can use this code for their own websites. The answer to that question is usually "yes", with attribution. There are some cases, such as using this code for a business or something that is greater than a personal project, that we may be less comfortable saying yes to. If in doubt, please don't hesitate to ask us.
We value keeping this project open source, but as you all know, plagiarism is bad. We actively spend a non-negligible amount of effort developing, designing, and trying to perfect this iteration of our project, and we are proud of it! All we ask is to not claim this effort as your own.
So, feel free to fork this repo. If you do, please just give us proper credit by linking back to this repo, https://github.com/Sundar-Clinic/Main-Website. Refer to this handy quora post if you're not sure what to do. Thanks!
