Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# For turbo builds, prefixes with NEXT_PUBLIC_ are automatically considered to force a rebuild
NEXT_PUBLIC_OPENPANEL_CLIENT_ID=
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=
9 changes: 5 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"editor.defaultFormatter": "biomejs.biome"
},
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit",
"quickfix.biome": "explicit"
},
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib",
}
"typescript.tsdk": "node_modules/typescript/lib"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The main goal is to provide a better way to explore tech companies in Portugal.
- [Nuqs](https://nuqs.47ng.com) - URL query state management (client and server support + some other cool features out of the box)
- [Turbo](https://turbo.build/) - Monorepo build system
- [Vercel](https://vercel.com/) - Hosting and CI/CD
- [OpenPanel](https://openpanel.dev/) - Analytics (Currently DISABLED/NOT USED due to removal of free tier)
- [PostHog](https://posthog.com/) - Analytics (replaces [OpenPanel](https://openpanel.dev/) due to removal of free tier)

## How to contribute 🤝

Expand Down
1 change: 1 addition & 0 deletions apps/web/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { NextConfig } from "next";

const nextConfig: NextConfig = {
reactStrictMode: true,
transpilePackages: ["@tech-companies-portugal/analytics"],
};

export default nextConfig;
3 changes: 2 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"slugify": "1.6.6",
"tailwind-merge": "2.2.1",
"tailwindcss-animate": "1.0.7",
"use-debounce": "10.0.4"
"use-debounce": "10.0.4",
"@tech-companies-portugal/analytics": "*"
},
"devDependencies": {
"@playwright/test": "1.50.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(companies-list)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import CompaniesHeader from "@/components/CompaniesHeader";
import { CompaniesListSkeleton } from "@/components/CompaniesListSkeleton";
import Footer from "@/components/Footer";
import { Skeleton } from "@/components/ui/skeleton";
import { LayoutProps } from "@/lib/types";
import type { LayoutProps } from "@/lib/types";
import { Suspense } from "react";

export default function AppLayout({ children }: LayoutProps) {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/category/[category]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Footer from "@/components/Footer";
import { LayoutProps } from "@/lib/types";
import type { LayoutProps } from "@/lib/types";
import { Suspense } from "react";

export default function CategoryPageLayout({ children }: LayoutProps) {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/category/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
defaultTwitterMetadata,
} from "@/lib/metadata";
import { getParsedCompaniesData } from "@/lib/parser/companies";
import { NextParams } from "@/lib/types";
import { Metadata } from "next";
import type { NextParams } from "@/lib/types";
import type { Metadata } from "next";
import { Suspense } from "react";

export async function generateMetadata({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/category/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { APP_URL } from "@/lib/metadata";
import { getParsedCompaniesData } from "@/lib/parser/companies";
import { MetadataRoute } from "next";
import type { MetadataRoute } from "next";

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const { availableCategories, updatedAtISODate } =
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/company/[slug]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SimpleFooter from "@/components/SimpleFooter";
import { Skeleton } from "@/components/ui/skeleton";
import { LayoutProps } from "@/lib/types";
import type { LayoutProps } from "@/lib/types";
import { Suspense } from "react";

export default function CompanyPageLayout({ children }: LayoutProps) {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/company/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
getParsedCompaniesData,
getParsedCompanyBySlug,
} from "@/lib/parser/companies";
import { NextParams } from "@/lib/types";
import type { NextParams } from "@/lib/types";
import { Briefcase, Globe } from "lucide-react";
import { notFound } from "next/navigation";
import { Metadata } from "next/types";
import type { Metadata } from "next/types";

// force generation on demand for paths not known at build time
// export const dynamicParams = true;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/company/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { APP_URL } from "@/lib/metadata";
import { getParsedCompaniesData } from "@/lib/parser/companies";
import { MetadataRoute } from "next";
import type { MetadataRoute } from "next";

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const { companies, updatedAtISODate } = await getParsedCompaniesData();
Expand Down
26 changes: 15 additions & 11 deletions apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import {
defaultTwitterMetadata,
verificationMetadata,
} from "@/lib/metadata";
import { LayoutProps } from "@/lib/types";
import type { LayoutProps } from "@/lib/types";
import { cn } from "@/lib/utils";
import { Metadata, Viewport } from "next/types";
import type { Metadata, Viewport } from "next/types";
import { NuqsAdapter } from "nuqs/adapters/next/app";
import "./globals.css";
import { AnalyticsProvider } from "@tech-companies-portugal/analytics/client";

export const metadata: Metadata = {
...defaultMetadata,
twitter: {
Expand Down Expand Up @@ -42,15 +44,17 @@ export default function RootLayout({ children }: LayoutProps) {
GeistMono.variable,
)}
>
<NuqsAdapter>
<Navbar />
{children}
<DotPattern
className={cn(
"[mask-image:radial-gradient(620px_circle_at_center,white,transparent)] fixed inset-0 -z-10",
)}
/>
</NuqsAdapter>
<AnalyticsProvider>
<NuqsAdapter>
<Navbar />
{children}
<DotPattern
className={cn(
"[mask-image:radial-gradient(620px_circle_at_center,white,transparent)] fixed inset-0 -z-10",
)}
/>
</NuqsAdapter>
</AnalyticsProvider>
</body>
</html>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/location/[location]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Footer from "@/components/Footer";
import { Skeleton } from "@/components/ui/skeleton";
import { LayoutProps } from "@/lib/types";
import type { LayoutProps } from "@/lib/types";
import { Suspense } from "react";

export default function LocationPageLayout({ children }: LayoutProps) {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/location/[location]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
defaultTwitterMetadata,
} from "@/lib/metadata";
import { getParsedCompaniesData } from "@/lib/parser/companies";
import { NextParams } from "@/lib/types";
import { Metadata } from "next";
import type { NextParams } from "@/lib/types";
import type { Metadata } from "next";
import { Suspense } from "react";

export async function generateMetadata({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/location/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { APP_URL } from "@/lib/metadata";
import { getParsedCompaniesData } from "@/lib/parser/companies";
import { MetadataRoute } from "next";
import type { MetadataRoute } from "next";

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const { availableLocations, updatedAtISODate } =
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { APP_URL } from "@/lib/metadata";
import { MetadataRoute } from "next/types";
import type { MetadataRoute } from "next/types";

export default function robots(): MetadataRoute.Robots {
return {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { APP_URL } from "@/lib/metadata";
import { MetadataRoute } from "next/types";
import type { MetadataRoute } from "next/types";

export default function sitemap(): MetadataRoute.Sitemap {
let routes = [""].map((route) => ({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/CompaniesList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Company } from "@/lib/types";
import type { Company } from "@/lib/types";
import { matchCompanies } from "@/lib/utils";
import { motion } from "motion/react";
import { useMemo } from "react";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/CompaniesListHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Company } from "@/lib/types";
import type { Company } from "@/lib/types";
import { cn } from "@/lib/utils";
import { formatDistanceToNow } from "date-fns";
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/CompanyItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Company } from "@/lib/types";
import type { Company } from "@/lib/types";
import { cn } from "@/lib/utils";
import { ChevronRight, MapPin } from "lucide-react";
import Link from "next/link";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/ui/badge.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type VariantProps, cva } from "class-variance-authority";
import * as React from "react";
import type * as React from "react";

import { cn } from "@/lib/utils";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/lib/metadata.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Metadata } from "next/types";
import type { Metadata } from "next/types";

export const TITLE =
"Tech Companies in Portugal | Leading Startups & Innovators";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/lib/parser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { load as cheerioLoad } from "cheerio";
import slugify from "slugify";
import { featuredSlugCompanies } from "./featured";
import { Company } from "./types";
import type { Company } from "./types";

export const parseCompaniesData = async () => {
try {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
import { Company } from "./types";
import type { Company } from "./types";

export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
Expand Down
6 changes: 5 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
"recommended": false,
"suspicious": {},
"style": {
"useBlockStatements": "off"
"useBlockStatements": "off",
"useImportType": "error"
},
"correctness": {
"useExhaustiveDependencies": "error"
}
}
},
Expand Down
Loading