Skip to content

Commit 544d6c9

Browse files
Merge branch 'prod' into developer
2 parents 532108c + 3b4e5a4 commit 544d6c9

39 files changed

+6430
-6062
lines changed

.github/workflows/e2e.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
name: End-to-end Tests
22
on:
33
push:
4-
branches: [main, develop]
4+
branches: [main, develop, prod]
55
pull_request:
6-
branches: [main, develop]
6+
branches: [main, develop, prod]
77
jobs:
88
e2e:
99
timeout-minutes: 60
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v6
1313
- name: Prepare .env file
1414
run: |
1515
rm -f .env && touch .env
1616
echo "NEXT_PUBLIC_FORMSPREE_ID=fake123" >> .env
1717
echo "NEXT_PUBLIC_RECAPTCHA_SITE_KEY=123fAkE" >> .env
18-
- uses: actions/setup-node@v3
18+
- uses: actions/setup-node@v6
1919
with:
20-
node-version: '18.x'
20+
node-version: '24.x'
2121
- name: Install dependencies
2222
run: npm ci
2323
- name: Install Playwright Browsers
2424
run: npx playwright install --with-deps
2525
- name: Run Playwright tests
2626
run: npm run test
27-
- uses: actions/upload-artifact@v3
27+
- uses: actions/upload-artifact@v5
2828
if: always()
2929
with:
3030
name: playwright-report

.github/workflows/validate.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: Lint, Format and Build
22
on:
33
push:
4-
branches: [main, develop]
4+
branches: [main, develop, prod]
55
pull_request:
6-
branches: [main, develop]
6+
branches: [main, develop, prod]
77
jobs:
88
validate:
99
timeout-minutes: 60
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-node@v3
12+
- uses: actions/checkout@v6
13+
- uses: actions/setup-node@v6
1414
with:
15-
node-version: '14.x'
15+
node-version: '24.x'
1616
- name: Install dependencies
1717
run: npm ci
1818
- name: Run code validation (includes linting, prettier and building)

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ yarn.lock
4242

4343
# typescript
4444
*.tsbuildinfo
45+
46+
next-env.d.ts

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Please note we have a [code of conduct](https://github.com/reactdeveloperske/rea
2828
If you're ready to contribute and create your PR, it will help to set up a local environment so you can see your changes.
2929

3030
1. Set up your development environment
31-
3231
- install your favorite text editor/IDE
3332
- install [Nodejs](nodejs.org)
3433

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This repository contains the source for the community showcase website maintaine
88
Live production: https://www.reactdevske.org/
99

1010
**Table of contents**
11+
1112
- Overview
1213
- Features
1314
- Tech stack
@@ -23,13 +24,15 @@ Live production: https://www.reactdevske.org/
2324
This site showcases the community, upcoming events, contact information and resources for React developers in Kenya. It's intended as a community-maintained, easy-to-contribute codebase for public-facing content and event announcements.
2425

2526
**Features**
27+
2628
- Responsive, accessible UI built with Next.js and Tailwind CSS.
2729
- Pages for home, about, contact, events, news, forum and members.
2830
- Reusable component library under `src/components`.
2931
- Playwright end-to-end tests (see `e2e/`).
3032
- Docker support for production-like local testing.
3133

3234
**Tech stack**
35+
3336
- Next.js (pages-based) + React
3437
- TypeScript
3538
- Tailwind CSS
@@ -39,6 +42,7 @@ This site showcases the community, upcoming events, contact information and reso
3942
**Quickstart (local development)**
4043

4144
Prerequisites:
45+
4246
- Node.js 16+ (or the version compatible with the `next` dependency)
4347
- npm or yarn
4448

@@ -47,7 +51,7 @@ Install dependencies:
4751
```bash
4852
npm install
4953
# or
50-
yarn install
54+
yarn install
5155
```
5256

5357
Run the development server:
@@ -65,6 +69,7 @@ npm run start
6569
```
6670

6771
Useful scripts (from `package.json`):
72+
6873
- `npm run dev` — starts Next.js in development mode
6974
- `npm run build` — produces a production build
7075
- `npm run start` — runs the production build
@@ -104,6 +109,7 @@ Playwright config is at `playwright.config.ts`.
104109
- `package.json`, `tsconfig.json`, `next.config.js` — build & tooling
105110

106111
If you want to explore components, start with:
112+
107113
- `src/components/HeroHeader` — site hero
108114
- `src/components/Navbar` — navigation and menu
109115
- `src/components/Events` — events listing and display
@@ -117,6 +123,7 @@ Contributions are welcome. Please follow the contribution guidelines and communi
117123
- Code of conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
118124

119125
Suggested workflow:
126+
120127
1. Fork the repo and create a feature branch.
121128
2. Run the dev server and make changes.
122129
3. Ensure TypeScript and lint checks pass: `npm run typecheck` and `npm run lint`.
@@ -134,4 +141,5 @@ Figma design file used for the website is available here:
134141
https://www.figma.com/file/TVwnaDhBGeVdnVKdf6H91C/React-developers-community-website
135142

136143
---
144+
137145
_Last updated: 2026-02-15_

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ services:
88
- .:/app
99
command: npm run dev
1010
ports:
11-
- "3000:3000"
11+
- '3000:3000'
1212
environment:
1313
NODE_ENV: development

e2e/events.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test.describe('Test if see more link is clickable', () => {
1414
const [newPage] = await Promise.all([
1515
context.waitForEvent('page'),
1616
page.waitForLoadState(),
17-
page.getByRole('link', { name: 'See More' }).click(),
17+
page.getByRole('link', { name: 'See More Events' }).click(),
1818
]);
1919
await expect(newPage).toHaveURL(
2020
'https://kommunity.com/reactjs-developer-community-kenya-reactdevske/events'

e2e/hero-header.spec.ts

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
import { test, expect } from '@playwright/test';
1+
import { expect, test } from '@playwright/test';
22

33
test.beforeEach(async ({ page }) => {
44
page.goto('http://localhost:3000');
55
});
66

77
test.describe('Test Hero Header Navigation Links', () => {
8-
test('About us link should navigate to about us section', async ({
9-
page,
10-
}) => {
11-
await page.getByRole('link', { name: 'About us' }).click();
12-
await expect(page).toHaveURL('/#about-us');
8+
test('About us link should navigate to about us page', async ({ page }) => {
9+
await page.getByRole('link', { name: 'About Us' }).click();
10+
await expect(page).toHaveURL('/about');
1311
});
1412

15-
test('Events link should navigate to Events section', async ({ page }) => {
16-
await page.getByRole('link', { name: 'Events' }).click();
17-
await expect(page).toHaveURL('/#events');
13+
test('Events link should navigate to Events page', async ({ page }) => {
14+
await page.getByRole('link', { name: 'Workshops & Events' }).click();
15+
await expect(page).toHaveURL('/events');
1816
});
1917

20-
test('Contact link should navigate to Contact Us section', async ({
21-
page,
22-
}) => {
23-
await page.getByRole('link', { name: 'Contact' }).click();
24-
await expect(page).toHaveURL('/#contact-us');
18+
test('Community link should navigate to Community page', async ({ page }) => {
19+
await page.getByRole('link', { name: 'Community', exact: true }).click();
20+
await expect(page).toHaveURL('/community');
2521
});
2622

2723
test('Join Community link should open google form in new tab', async ({
@@ -31,12 +27,12 @@ test.describe('Test Hero Header Navigation Links', () => {
3127
const [newPage] = await Promise.all([
3228
context.waitForEvent('page'),
3329
page.waitForLoadState(),
34-
page.getByRole('link', { name: 'Join Community' }).click(),
30+
page.getByRole('link', { name: 'Join the Community' }).click(),
3531
]);
36-
await expect(newPage).toHaveURL(
37-
new RegExp(
38-
'^https://docs.google.com/forms/d/e/1FAIpQLSc_k5sffFTeL9oDug41nXU4Spw5cV84ExaL3jNFu_I1FTZO1w/viewform'
39-
)
32+
await newPage.waitForLoadState('load');
33+
// Accept bit.ly shortlink, docs.google.com, or forms.gle redirect destinations
34+
expect(newPage.url()).toMatch(
35+
/^(https:\/\/)?(bit\.ly|docs\.google\.com|forms\.gle)/
4036
);
4137
});
4238

@@ -49,10 +45,10 @@ test.describe('Test Hero Header Navigation Links', () => {
4945
page.waitForLoadState(),
5046
page.getByRole('link', { name: 'Join ReactDevsKe' }).click(),
5147
]);
52-
await expect(newPage).toHaveURL(
53-
new RegExp(
54-
'^https://docs.google.com/forms/d/e/1FAIpQLSc_k5sffFTeL9oDug41nXU4Spw5cV84ExaL3jNFu_I1FTZO1w/viewform'
55-
)
48+
await newPage.waitForLoadState('load');
49+
// Accept bit.ly shortlink, docs.google.com, or forms.gle redirect destinations
50+
expect(newPage.url()).toMatch(
51+
/^(https:\/\/)?(bit\.ly|docs\.google\.com|forms\.gle)/
5652
);
5753
});
5854
});

e2e/home.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ test.describe('Home page tests', () => {
1111
).toBeVisible();
1212
});
1313

14-
test("should show 'Join Community' button", async ({ page }) => {
14+
test("should show 'Join the Community' button", async ({ page }) => {
1515
await expect(
16-
page.getByRole('link', { name: 'Join Community' })
16+
page.getByRole('link', { name: 'Join the Community' })
1717
).toBeVisible();
1818
});
1919

eslint.config.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import nextVitals from 'eslint-config-next/core-web-vitals';
2+
import { defineConfig, globalIgnores } from 'eslint/config';
3+
4+
const eslintConfig = defineConfig([
5+
...nextVitals,
6+
// Override default ignores of eslint-config-next.
7+
globalIgnores([
8+
// Default ignores of eslint-config-next:
9+
'.next/**',
10+
'out/**',
11+
'build/**',
12+
'next-env.d.ts',
13+
]),
14+
]);
15+
16+
export default eslintConfig;

0 commit comments

Comments
 (0)