Skip to content

Commit ecb428a

Browse files
committed
chore: remove orphan code
2 parents 988ef41 + 6f01088 commit ecb428a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+6987
-6270
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

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
# minimal alpine image for quick dev build
3+
# FROM mhart/alpine-node
4+
5+
6+
FROM node:alpine
7+
WORKDIR /app
8+
COPY . .
9+
RUN yarn install
10+
RUN yarn build
11+
EXPOSE 3000
12+
CMD ["yarn", "start"]
13+
14+
15+
16+
#For production environment
17+
# FROM node:alpine as BUILD_IMAGE
18+
# WORKDIR /app
19+
# COPY package.json yarn.lock ./
20+
# # install dependencies
21+
# RUN yarn install --frozen-lockfile
22+
# COPY . .
23+
# # build
24+
# RUN yarn build
25+
# # remove dev dependencies
26+
# RUN npm prune --production
27+
28+
# FROM node:alpine
29+
# WORKDIR /app
30+
# # copy from build image
31+
# COPY --from=BUILD_IMAGE /app/package.json ./package.json
32+
# COPY --from=BUILD_IMAGE /app/node_modules ./node_modules
33+
# COPY --from=BUILD_IMAGE /app/.next ./.next
34+
# COPY --from=BUILD_IMAGE /app/public ./public
35+
# EXPOSE 3000
36+
# CMD ["yarn", "start"]

README.md

Lines changed: 137 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,145 @@
11
<h1 align="center" style="margin-top: 1em; margin-bottom: 3em;">
2-
<p><a href="https://reactdevske.netlify.app/"><img alt="logo" src="./public/reactdevske.svg" alt="reactdevske" width="125"></a></p>
3-
<p> <img src="https://media.giphy.com/media/hvRJCLFzcasrR4ia7z/giphy.gif" alt="Waving Hand" width="25px" height="25px"> Welcome to Reactjs Developer Community Kenya Website!</p>
2+
<p><a href="https://reactdevske.netlify.app/"><img alt="logo" src="./public/reactdevske.svg" width="125"></a></p>
3+
<p> <img src="https://media.giphy.com/media/hvRJCLFzcasrR4ia7z/giphy.gif" alt="Waving Hand" width="25px" height="25px"> React Developers Community — Kenya</p>
44
</h1>
55

6-
This is the repo for the showcase website of the React Developer Community in Kenya
6+
This repository contains the source for the community showcase website maintained by the React Developers Community (Kenya). The site is built with Next.js, TypeScript and Tailwind CSS, includes end-to-end tests with Playwright, and is container-ready using Docker.
77

8-
Check out the live version [HERE](https://reactdevske.vercel.app/)
8+
Live production: https://www.reactdevske.org/
99

10-
## Contributing to the project
10+
**Table of contents**
1111

12-
Contributions are always welcome!
12+
- Overview
13+
- Features
14+
- Tech stack
15+
- Quickstart
16+
- Docker
17+
- Testing
18+
- Project structure
19+
- Contributing
20+
- License & contact
1321

14-
See [`contributing.md`](https://github.com/reactdeveloperske/reactdevske-website/blob/main/CONTRIBUTING.md) for ways to get started.
22+
**Overview**
1523

16-
Please adhere to this project's [`code of conduct`](https://github.com/reactdeveloperske/reactdevske-website/blob/main/CODE_OF_CONDUCT.md).
24+
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.
25+
26+
**Features**
27+
28+
- Responsive, accessible UI built with Next.js and Tailwind CSS.
29+
- Pages for home, about, contact, events, news, forum and members.
30+
- Reusable component library under `src/components`.
31+
- Playwright end-to-end tests (see `e2e/`).
32+
- Docker support for production-like local testing.
33+
34+
**Tech stack**
35+
36+
- Next.js (pages-based) + React
37+
- TypeScript
38+
- Tailwind CSS
39+
- Playwright for E2E testing
40+
- Prettier, ESLint, and TypeScript for quality checks
41+
42+
**Quickstart (local development)**
43+
44+
Prerequisites:
45+
46+
- Node.js 16+ (or the version compatible with the `next` dependency)
47+
- npm or yarn
48+
49+
Install dependencies:
50+
51+
```bash
52+
npm install
53+
# or
54+
yarn install
55+
```
56+
57+
Run the development server:
58+
59+
```bash
60+
npm run dev
61+
# opens at http://localhost:3000
62+
```
63+
64+
Build for production:
65+
66+
```bash
67+
npm run build
68+
npm run start
69+
```
70+
71+
Useful scripts (from `package.json`):
72+
73+
- `npm run dev` — starts Next.js in development mode
74+
- `npm run build` — produces a production build
75+
- `npm run start` — runs the production build
76+
- `npm run lint` — runs ESLint
77+
- `npm run test` — runs Playwright tests
78+
79+
**Docker**
80+
81+
This repository contains a `Dockerfile` and `docker-compose.yml` for running the app in a container.
82+
83+
Build & run with Docker Compose:
84+
85+
```bash
86+
docker-compose up --build
87+
```
88+
89+
The app will be available on the port configured in `docker-compose.yml` (default: 3000).
90+
91+
**Testing (Playwright)**
92+
93+
End-to-end tests are in the `e2e/` folder and are run using Playwright. To run tests locally:
94+
95+
```bash
96+
npm run test
97+
```
98+
99+
Playwright config is at `playwright.config.ts`.
100+
101+
**Project structure (important files & folders)**
102+
103+
- `public/` — static assets (images, manifest)
104+
- `src/pages/` — Next.js pages (routes)
105+
- `src/components/` — shared React components (Navbar, HeroHeader, Events, ContactUs, etc.)
106+
- `src/styles/` — global and module CSS (Tailwind entry)
107+
- `e2e/` — Playwright end-to-end tests
108+
- `Dockerfile`, `docker-compose.yml` — container configuration
109+
- `package.json`, `tsconfig.json`, `next.config.js` — build & tooling
110+
111+
If you want to explore components, start with:
112+
113+
- `src/components/HeroHeader` — site hero
114+
- `src/components/Navbar` — navigation and menu
115+
- `src/components/Events` — events listing and display
116+
- `src/components/ContactUs` — contact form and footer
117+
118+
**Contributing**
119+
120+
Contributions are welcome. Please follow the contribution guidelines and community standards:
121+
122+
- Contribution guide: [CONTRIBUTING.md](CONTRIBUTING.md)
123+
- Code of conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
124+
125+
Suggested workflow:
126+
127+
1. Fork the repo and create a feature branch.
128+
2. Run the dev server and make changes.
129+
3. Ensure TypeScript and lint checks pass: `npm run typecheck` and `npm run lint`.
130+
4. Add/update tests if applicable.
131+
5. Open a pull request with a clear description of your changes.
132+
133+
**Maintainers & contact**
134+
If you need help or want to propose changes not suitable for a PR, open an issue or reach out via the community channels listed in the repo.
135+
136+
**License**
137+
This project is open source — see the `LICENSE` file for details.
138+
139+
**Design resources**
140+
Figma design file used for the website is available here:
141+
https://www.figma.com/file/TVwnaDhBGeVdnVKdf6H91C/React-developers-community-website
142+
143+
---
144+
145+
_Last updated: 2026-02-15_

components.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.js",
8+
"css": "src/styles/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"rtl": false,
15+
"aliases": {
16+
"components": "@/components",
17+
"utils": "@/lib/utils",
18+
"ui": "@/components/ui",
19+
"lib": "@/lib",
20+
"hooks": "@/hooks"
21+
},
22+
"registries": {}
23+
}

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '3.8'
2+
services:
3+
web:
4+
build:
5+
context: ./
6+
7+
volumes:
8+
- .:/app
9+
command: npm run dev
10+
ports:
11+
- '3000:3000'
12+
environment:
13+
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
});

0 commit comments

Comments
 (0)