Skip to content

Commit 1e10d11

Browse files
committed
Refactor: Migrate application to Turbo Repo, add TypeScript and Shadcn-UI support, remove unused files and configurations. Fix: Correct main domain redirect to 2023.
issue: #129
1 parent f4783a8 commit 1e10d11

File tree

249 files changed

+7237
-11147
lines changed

Some content is hidden

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

249 files changed

+7237
-11147
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This configuration only applies to the package manager root.
2+
/** @type {import("eslint").Linter.Config} */
3+
module.exports = {
4+
ignorePatterns: ["apps/**", "packages/**"],
5+
extends: ["@repo/eslint-config/library.js"],
6+
parser: "@typescript-eslint/parser",
7+
parserOptions: {
8+
project: true,
9+
},
10+
};

.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

3-
# dependencies
4-
/node_modules
5-
/.pnp
3+
# Dependencies
4+
node_modules
5+
.pnp
66
.pnp.js
77

8-
# testing
9-
/coverage
8+
# Local env files
9+
.env
10+
.env*.local
1011

11-
# next.js
12-
/.next/
13-
/out/
12+
# Testing
13+
coverage
1414

15-
# production
16-
/build
15+
# Turbo
16+
.turbo
17+
18+
# Vercel
19+
.vercel
20+
21+
# Build Outputs
22+
.next/
23+
out/
24+
build
25+
dist
1726

18-
# misc
19-
.DS_Store
20-
*.pem
2127

22-
# debug
28+
# Debug
2329
npm-debug.log*
2430
yarn-debug.log*
2531
yarn-error.log*
26-
.pnpm-debug.log*
2732

28-
# local env files
29-
.env*.local
30-
31-
# vercel
32-
.vercel
33+
# Misc
34+
.DS_Store
35+
*.pem

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
auto-install-peers = true
2+
enable-pre-post-scripts=true # Enable pre/post scripts (for postui:add)

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 dan5py ([email protected])
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 119 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,129 @@
22

33
## Run PyCon Uganda Website locally
44

5-
1. Install the dependencies
5+
![Static Badge](https://img.shields.io/badge/shadcn%2Fui-0.8.0-blue?link=https%3A%2F%2Fgithub.com%2Fshadcn%2Fui)
6+
7+
This is Turborepo starter with shadcn/ui pre-configured.
8+
9+
> [!NOTE]
10+
> This example uses `pnpm` as package manager.
11+
12+
[npm version](https://github.com/dan5py/ug.pycon.org/tree/npm)
13+
14+
## Using this example
15+
16+
Clone the repository:
17+
18+
```sh
19+
git clone https://github.com/PyconUg/ug.pycon.org.git
20+
```
21+
22+
Install dependencies:
23+
24+
```sh
25+
cd ug.pycon.org
26+
pnpm install
27+
```
28+
29+
### Add ui components
30+
31+
Use the pre-made script:
32+
33+
```sh
34+
pnpm ui:add <component-name>
35+
```
36+
37+
> This works just like the add command in the `shadcn/ui` CLI.
38+
39+
### Add a new app
40+
41+
Turborepo offer a simple command to add a new app:
42+
43+
```sh
44+
pnpm turbo gen workspace --name <app-name>
45+
```
46+
47+
This will create a new empty app in the `apps` directory.
48+
49+
If you want, you can copy an existing app with:
50+
51+
```sh
52+
pnpm turbo gen workspace --name <app-name> --copy
53+
```
54+
55+
> [!NOTE]
56+
> Remember to run `pnpm install` after copying an app.
57+
58+
## What's inside?
59+
60+
This Turborepo includes the following packages/apps:
61+
62+
### Apps and Packages
63+
64+
- `2024`: a [Next.js](https://nextjs.org/) app
65+
- `2024`: another [Next.js](https://nextjs.org/) app
66+
- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications (🚀 powered by **shadcn/ui**)
67+
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
68+
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
69+
70+
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
71+
72+
### Utilities
73+
74+
This Turborepo has some additional tools already setup for you:
75+
76+
- [TypeScript](https://www.typescriptlang.org/) for static type checking
77+
- [ESLint](https://eslint.org/) for code linting
78+
- [Prettier](https://prettier.io) for code formatting
79+
80+
### Build
81+
82+
To build all apps and packages, run the following command:
83+
84+
```sh
85+
cd ug.pycon.org
86+
pnpm build
87+
```
88+
89+
### Develop
90+
91+
To develop all apps and packages, run the following command:
92+
93+
```sh
94+
cd ug.pycon.org
95+
pnpm dev
96+
```
97+
98+
### Remote Caching
99+
100+
Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
101+
102+
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
103+
6104
```
7-
npm install
105+
cd ug.pycon.org
106+
npx turbo login
8107
```
9108

10-
2. First, run the development server
109+
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
110+
111+
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
11112

12-
```bash
13-
npm run dev
113+
```sh
114+
npx turbo link
14115
```
15116

16-
Access the live development server at [http://localhost:3000](http://localhost:3000)
117+
## Useful Links
118+
119+
Learn more about the power of Turborepo:
120+
121+
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
122+
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
123+
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
124+
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
125+
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
126+
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
127+
128+
Learn more about shadcn/ui:
17129

18-
You'll be able to access the development server and you can contribute accordingly.
130+
- [Documentation](https://ui.shadcn.com/docs)

app/2023/django-girls/page.jsx

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)