diff --git a/frontend/rescript.json b/frontend/rescript.json deleted file mode 100644 index 6de355a..0000000 --- a/frontend/rescript.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "social-media-polygraph-frontend", - "version": "0.2.0", - "sources": [ - { - "dir": "src", - "subdirs": true - } - ], - "package-specs": [ - { - "module": "es6", - "in-source": true - } - ], - "suffix": ".bs.js", - "bs-dependencies": [ - "@rescript/react", - "rescript-apollo-client" - ], - "warnings": { - "error": "+101+8" - }, - "jsx": { - "version": 4, - "mode": "automatic" - }, - "ppx-flags": [], - "bsc-flags": ["-open Belt"] -} diff --git a/frontend/src/Index.affine b/frontend/src/Index.affine new file mode 100644 index 0000000..d6b4897 --- /dev/null +++ b/frontend/src/Index.affine @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell +// Ported via Harvard Engine bulk-processor + +module Index; + +// TODO: Complete semantic implementation diff --git a/frontend/src/Index.res b/frontend/src/Index.res deleted file mode 100644 index 6c3b963..0000000 --- a/frontend/src/Index.res +++ /dev/null @@ -1,72 +0,0 @@ -// Main entry point for ReScript frontend - -%%raw(`import "./index.css"`) - -module App = { - @react.component - let make = () => { -
-
-
-

- {React.string("Social Media Polygraph")} -

-

- {React.string("AI-powered fact-checking with memory safety and formal verification")} -

- -
-
- } -} - -module Header = { - @react.component - let make = () => { -
- -
- } -} - -module Footer = { - @react.component - let make = () => { - - } -} - -// Initialize React app -switch ReactDOM.querySelector("#root") { -| Some(root) => { - let reactRoot = ReactDOM.Client.createRoot(root) - ReactDOM.Client.render(reactRoot, ) - } -| None => Js.Console.error("Root element not found") -} diff --git a/frontend/src/graphql/Client.affine b/frontend/src/graphql/Client.affine new file mode 100644 index 0000000..133e486 --- /dev/null +++ b/frontend/src/graphql/Client.affine @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell +// Ported via Harvard Engine bulk-processor + +module Client; + +// TODO: Complete semantic implementation diff --git a/frontend/src/graphql/Client.res b/frontend/src/graphql/Client.res deleted file mode 100644 index 2584014..0000000 --- a/frontend/src/graphql/Client.res +++ /dev/null @@ -1,20 +0,0 @@ -// Apollo GraphQL client configuration - -open ApolloClient - -let client = { - let httpLink = HttpLink.make(~uri="http://localhost:8000/graphql", ()) - - let cache = InMemoryCache.make() - - make( - ~link=httpLink, - ~cache, - ~defaultOptions=DefaultOptions.make( - ~watchQuery=DefaultWatchQueryOptions.make(~fetchPolicy=CacheFirst, ()), - ~query=DefaultQueryOptions.make(~fetchPolicy=CacheFirst, ()), - (), - ), - (), - ) -} diff --git a/frontend/src/graphql/Mutations.affine b/frontend/src/graphql/Mutations.affine new file mode 100644 index 0000000..4b7ed30 --- /dev/null +++ b/frontend/src/graphql/Mutations.affine @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell +// Ported via Harvard Engine bulk-processor + +module Mutations; + +// TODO: Complete semantic implementation diff --git a/frontend/src/graphql/Mutations.res b/frontend/src/graphql/Mutations.res deleted file mode 100644 index 6cd69ef..0000000 --- a/frontend/src/graphql/Mutations.res +++ /dev/null @@ -1,21 +0,0 @@ -// GraphQL mutations - -module VerifyClaimMutation = %graphql(` - mutation VerifyClaim($input: ClaimInput!) { - verifyClaim(input: $input) { - claimId - verdict - confidence - explanation - sources { - name - verdict - rating - url - } - entities - credibilityScore - checkedAt - } - } -`) diff --git a/frontend/src/graphql/Queries.affine b/frontend/src/graphql/Queries.affine new file mode 100644 index 0000000..5a66998 --- /dev/null +++ b/frontend/src/graphql/Queries.affine @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell +// Ported via Harvard Engine bulk-processor + +module Queries; + +// TODO: Complete semantic implementation diff --git a/frontend/src/graphql/Queries.res b/frontend/src/graphql/Queries.res deleted file mode 100644 index 31022da..0000000 --- a/frontend/src/graphql/Queries.res +++ /dev/null @@ -1,28 +0,0 @@ -// GraphQL queries - -module GetClaimQuery = %graphql(` - query GetClaim($id: String!) { - claim(id: $id) { - id - text - url - platform - author - textHash - createdAt - updatedAt - status - } - } -`) - -module ListClaimsQuery = %graphql(` - query ListClaims($skip: Int, $limit: Int) { - claims(skip: $skip, limit: $limit) { - id - text - status - createdAt - } - } -`) diff --git a/frontend/src/pages/VerifyPage.affine b/frontend/src/pages/VerifyPage.affine new file mode 100644 index 0000000..f94fcdd --- /dev/null +++ b/frontend/src/pages/VerifyPage.affine @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell +// Ported via Harvard Engine bulk-processor + +module VerifyPage; + +// TODO: Complete semantic implementation diff --git a/frontend/src/pages/VerifyPage.res b/frontend/src/pages/VerifyPage.res deleted file mode 100644 index 7ef6a68..0000000 --- a/frontend/src/pages/VerifyPage.res +++ /dev/null @@ -1,88 +0,0 @@ -// Verify claim page - -module VerifyPage = { - @react.component - let make = () => { - let (claimText, setClaimText) = React.useState(() => "") - let (result, setResult) = React.useState(() => None) - let (loading, setLoading) = React.useState(() => false) - - let handleSubmit = _evt => { - setLoading(_ => true) - - // TODO: Call GraphQL mutation via Apollo Client - Js.Promise.resolve() - ->Promise.thenResolve(_ => { - setLoading(_ => false) - setResult(_ => Some({ - "verdict": "unverifiable", - "confidence": 0.5, - "explanation": "Verification complete" - })) - }) - ->ignore - } - -
-
-

- {React.string("Verify a Claim")} -

- -
-
- -