Skip to content

Commit

Permalink
Merge pull request #389 from reedu-reengineering-education/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Thiemann96 authored Sep 27, 2024
2 parents 78cba67 + afa8dd5 commit 73eda27
Show file tree
Hide file tree
Showing 173 changed files with 7,028 additions and 1,832 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/next.config.js ./next.config.js
COPY --from=builder /app/package.json ./package.json
RUN chmod +x ./entrypoint.sh
RUN npm install ts-node typescript
RUN yarn add ts-node typescript

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
Expand Down
78 changes: 36 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,39 @@
<div align="center">
<h2 align="center">re:edu App</h2>
<h1 align="center">📍MapStories</h1>

<p align="center">
🚀 Template for re:edu applications
<br />
Tell stories with maps! <br>
<img src="assets/logos/logo_text_claim.png" alt="MapStories Logo"/>
</p>

<p align="center">
<a href="https://www.mapstories.de">🌐 Visit the live site</a>
</p>
</div>

<!-- ABOUT THE PROJECT -->

## About The Project
---

The re:edu App is a web based system to visualize the distribution process of teaching students.
## 🗺️ About The Project

Features:
MapStories is a web-based platform designed to visualize the process of distributing educational content and stories through interactive maps. It enables users to explore complex narratives and datasets in a visual and engaging way.

- 🏎 Fast

### Built With
### 🔧 Built With

- [Next.js](https://nextjs.org/)
- [Typescript](https://www.typescriptlang.org/)
- [TailwindCSS](https://tailwindcss.com/)

<!-- GETTING STARTED -->
---

## Getting Started
## 🚀 Getting Started

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

### Prerequisites

You will need to have Node.js and Yarn installed.
### 🛠️ Installation

### Installation
To get a local copy up and running, follow these steps:

1. Clone the repo
1. Clone the repository:
```sh
git clone https://github.com/reedu-reengineering-education/mapstories-2.0.git
```
Expand All @@ -51,44 +49,40 @@ You will need to have Node.js and Yarn installed.
```sh
npx prisma migrate dev
```
5. seed database with themes
```sh
npx prisma db seed
```
5. Seed database with themes
```sh
npx prisma db seed
```
6. Run the App
```sh
yarn dev
```

<!-- CONTRIBUTING -->

## Contributing
## 🤝 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
Contributions are what make the open source community such an incredible place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
To contribute:

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
- Fork the repository
- Create a new feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request

## GitHub Actions
Don't forget to give the project a ⭐ if you like it! Thank you!
With GitHub Actions, we automatically build Docker images and push them to the GitHub package registry.
## ⚙️ GitHub Actions
Docker images will be built on:
- Pull Requests to `main`
- Pushes to `main`
- Releasing new versions under a `v*.*.*` tag
With GitHub Actions, Docker images are automatically built and pushed to the GitHub package registry on:
- Pull Requests to main
- Pushes to main
- Releasing new versions under a v*.*.\* tag
<!-- CONTACT -->
## Contact
re:edu GmbH - [@reedu_de](https://twitter.com/reedu_de) - [email protected]
## 📧 Contact
Project Link: [https://github.com/reedu-reengineering-education/next-13-tailwind-starter](https://github.com/reedu-reengineering-education/next-13-tailwind-starter)
[re:edu](reedu.de) - [email protected]
59 changes: 59 additions & 0 deletions emails/confirmNewEmail.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { Html } from '@react-email/html'
import * as React from 'react'
import { Tailwind } from '@react-email/tailwind'
import { Head } from '@react-email/head'
import { Heading } from '@react-email/heading'
import { Text } from '@react-email/text'
import { Font } from '@react-email/font'
import { Container } from '@react-email/container'
import { Button } from '@react-email/button'
interface SignInProps {
url: string
}

export default function ConfirmNewEmail({ url }: SignInProps) {
return (
<Tailwind
config={{
theme: {
extend: {
colors: {
brand: '#38383a',
},
},
},
}}
>
<Head>
<title>Mapstories E-Mail bestätigen</title>
<Font
fallbackFontFamily="Helvetica"
fontFamily="sans-serif"
fontStyle="normal"
fontWeight={400}
/>
</Head>
<Html>
<Container>
<Heading as="h2">Mapstories E-Mail bestätigen</Heading>
<Text>
Du möchtest deine E-Mail Adresse ändern? Dann bestätige deine neue
E-Mail Adresse!
</Text>
Kopiere diesen Link in deinen Browser, um dich anzumelden / Copy this
link to sign in / Copia este enlace para iniciar sesión / Copiez ce
lien pour vous connecter:
<br />
<br />
<Button
className="bg-brand text-md mx-auto rounded-md px-4 py-2 font-medium text-white"
href={url}
>
{' '}
E-Mail bestätigen{' '}
</Button>
</Container>
</Html>
</Tailwind>
)
}
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"@prisma/client": "^4.12.0",
"@radix-ui/react-avatar": "^1.0.1",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.0.3",
"@radix-ui/react-icons": "^1.2.0",
"@radix-ui/react-select": "^1.2.2",
"@radix-ui/react-switch": "^1.0.1",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toolbar": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.5",
"@radix-ui/react-tooltip": "^1.1.2",
"@react-email/button": "0.0.8",
"@react-email/container": "0.0.8",
"@react-email/font": "0.0.1",
Expand All @@ -52,6 +52,7 @@
"classnames": "^2.3.2",
"create-email": "^0.0.23",
"date-fns": "^2.30.0",
"embla-carousel-react": "^8.1.8",
"eslint": "8.35.0",
"eslint-config-next": "^14.1.0",
"framer-motion": "^10.10.0",
Expand All @@ -71,6 +72,7 @@
"next-superjson-plugin": "^0.5.7",
"nodemailer": "^6.9.1",
"open-graph-scraper": "^5.2.3",
"prettier": "^3.3.3",
"pure-geojson-validation": "^0.3.0",
"react": "^18.2.0",
"react-accessible-accordion": "^5.0.0",
Expand All @@ -79,10 +81,11 @@
"react-dropzone": "^14.2.3",
"react-hook-form": "^7.43.3",
"react-hot-toast": "^2.4.0",
"react-i18next": "^12.2.0",
"react-i18next": "^15.0.1",
"react-map-gl": "^7.0.21",
"react-map-gl-geocoder": "^2.2.0",
"react-player": "^2.12.0",
"react-simple-captcha": "^9.3.1",
"react-social-media-embed": "^2.3.5",
"react-sub-unsub": "^2.1.6",
"react-tabs": "^6.0.1",
Expand All @@ -93,6 +96,7 @@
"slugify": "^1.6.5",
"spotify-embed": "^1.5.0",
"superjson": "^1.12.2",
"swiper": "^11.1.12",
"swr": "^2.0.4",
"ts-node": "^10.9.1",
"typescript": "4.9.5",
Expand All @@ -116,8 +120,7 @@
"husky": "^8.0.0",
"lint-staged": "^13.1.2",
"postcss": "^8.4.21",
"prettier": "3.2.2",
"prettier-plugin-tailwindcss": "^0.2.3",
"prettier-plugin-tailwindcss": "^0.6.6",
"prisma": "^4.12.0",
"sass": "^1.58.3",
"tailwindcss": "^3.2.7"
Expand Down
9 changes: 4 additions & 5 deletions pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ import NextAuth from 'next-auth'
import type { NextApiRequest, NextApiResponse } from 'next'
import { authOptions } from '@/src/lib/auth'


export default async function auth(req: NextApiRequest, res: NextApiResponse) {
//https://next-auth.js.org/tutorials/avoid-corporate-link-checking-email-provider
if (req.method === 'HEAD') {
res.status(200).end();
return;
res.status(200).end()
return
}
// if user agent is a bot, return 404

if (req.headers['user-agent']?.match(/bot|preview|crawler|spider/i)) {
res.status(200).end()
return
}

// Do whatever you want here, before the request is passed down to `NextAuth`
return await NextAuth(req, res, authOptions)
}
}
4 changes: 2 additions & 2 deletions pages/api/mapstory/[storyId]/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
})

if (!storyToUpdate) {
res.status(404).end();
return;
res.status(404).end()
return
}

let data: any = payload
Expand Down
6 changes: 3 additions & 3 deletions pages/api/mapstory/[storyId]/step/[storyStepId]/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {

if (!storyId) {
res.status(422).end()
return;
return
}

const story = await db.story.findFirst({
Expand Down Expand Up @@ -103,8 +103,8 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {

//TODO: THis can never happen but we need this code for TS?
if (!deletedStep.storyId) {
res.status(422).end()
return;
res.status(422).end()
return
}

const updatedStory = await db.story.findFirst({
Expand Down
Loading

0 comments on commit 73eda27

Please sign in to comment.