Skip to content

Commit dd50c4d

Browse files
committed
Initial commit
0 parents  commit dd50c4d

File tree

160 files changed

+13540
-0
lines changed

Some content is hidden

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

160 files changed

+13540
-0
lines changed

.env.development

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SKIP_PREFLIGHT_CHECK=true
2+
3+
VITE_SUPABASE_URL=http://127.0.0.1:54321
4+
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
5+
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
6+
DATABASE_URL=postgres://postgres:[email protected]:54322/postgres

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
.eslintcache
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
supabase/.branches
24+
supabase/.temp

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# React-admin CRM
2+
3+
This is a demo of the [react-admin](https://github.com/marmelab/react-admin) library for React.js. It's a CRM for a fake Web agency with a few sales. You can test it online at https://marmelab.com/react-admin-crm.
4+
5+
https://user-images.githubusercontent.com/99944/116970434-4a926480-acb8-11eb-8ce2-0602c680e45e.mp4
6+
7+
React-admin usually requires a REST/GraphQL server to provide data. In this demo however, the API is simulated by the browser (using [FakeRest](https://github.com/marmelab/FakeRest)). The source data is generated at runtime by a package called [data-generator](https://github.com/marmelab/react-admin/tree/master/examples/data-generator).
8+
9+
To explore the source code, start with [src/App.tsx](https://github.com/marmelab/react-admin/blob/master/examples/crm/src/App.tsx).
10+
11+
**Note**: This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
12+
13+
## Setup
14+
15+
After having cloned the react-admin repository, run the following command at the project root:
16+
17+
```sh
18+
npm install
19+
```
20+
21+
Then, login into your supabase account:
22+
23+
```sh
24+
npx supabase login
25+
```
26+
27+
Then, create a new supabase project:
28+
```sh
29+
npx supabase projects create react-admin-crm
30+
```
31+
32+
33+
## Available Scripts
34+
35+
In the project directory, you can run:
36+
37+
### `npm start`
38+
39+
Runs the app in the development mode.<br>
40+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
41+
42+
The page will reload if you make edits.<br>
43+
You will also see any lint errors in the console.
44+
45+
### `npm test`
46+
47+
Launches the test runner in the interactive watch mode.<br>
48+
See the section about [running tests](#running-tests) for more information.
49+
50+
### `npm run build`
51+
52+
Builds the app for production to the `build` folder.<br>
53+
It correctly bundles React in production mode and optimizes the build for the best performance.
54+
55+
The build is minified and the filenames include the hashes.<br>
56+
Your app is ready to be deployed!
57+
58+
### `npm run deploy`
59+
60+
Deploy the build to GitHub gh-pages.

index.html

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta
6+
name="viewport"
7+
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
8+
/>
9+
<meta name="theme-color" content="#000000" />
10+
<link rel="manifest" href="./manifest.json" />
11+
<link rel="shortcut icon" href="./favicon.ico" />
12+
<title>Atomic CRM</title>
13+
<style>
14+
body {
15+
margin: 0;
16+
padding: 0;
17+
font-family: sans-serif;
18+
}
19+
20+
.loader-container {
21+
display: flex;
22+
align-items: center;
23+
justify-content: center;
24+
flex-direction: column;
25+
position: absolute;
26+
top: 0;
27+
bottom: 0;
28+
left: 0;
29+
right: 0;
30+
background-color: #fafafa;
31+
}
32+
33+
/* CSS Spinner from https://projects.lukehaas.me/css-loaders/ */
34+
35+
.loader,
36+
.loader:before,
37+
.loader:after {
38+
border-radius: 50%;
39+
}
40+
41+
.loader {
42+
color: #283593;
43+
font-size: 11px;
44+
text-indent: -99999em;
45+
margin: 55px auto;
46+
position: relative;
47+
width: 10em;
48+
height: 10em;
49+
box-shadow: inset 0 0 0 1em;
50+
-webkit-transform: translateZ(0);
51+
-ms-transform: translateZ(0);
52+
transform: translateZ(0);
53+
}
54+
55+
.loader:before,
56+
.loader:after {
57+
position: absolute;
58+
content: '';
59+
}
60+
61+
.loader:before {
62+
width: 5.2em;
63+
height: 10.2em;
64+
background: #fafafa;
65+
border-radius: 10.2em 0 0 10.2em;
66+
top: -0.1em;
67+
left: -0.1em;
68+
-webkit-transform-origin: 5.2em 5.1em;
69+
transform-origin: 5.2em 5.1em;
70+
-webkit-animation: load2 2s infinite ease 1.5s;
71+
animation: load2 2s infinite ease 1.5s;
72+
}
73+
74+
.loader:after {
75+
width: 5.2em;
76+
height: 10.2em;
77+
background: #fafafa;
78+
border-radius: 0 10.2em 10.2em 0;
79+
top: -0.1em;
80+
left: 5.1em;
81+
-webkit-transform-origin: 0px 5.1em;
82+
transform-origin: 0px 5.1em;
83+
-webkit-animation: load2 2s infinite ease;
84+
animation: load2 2s infinite ease;
85+
}
86+
87+
@-webkit-keyframes load2 {
88+
0% {
89+
-webkit-transform: rotate(0deg);
90+
transform: rotate(0deg);
91+
}
92+
100% {
93+
-webkit-transform: rotate(360deg);
94+
transform: rotate(360deg);
95+
}
96+
}
97+
98+
@keyframes load2 {
99+
0% {
100+
-webkit-transform: rotate(0deg);
101+
transform: rotate(0deg);
102+
}
103+
100% {
104+
-webkit-transform: rotate(360deg);
105+
transform: rotate(360deg);
106+
}
107+
}
108+
</style>
109+
<link rel="preconnect" href="https://fonts.gstatic.com" />
110+
<link
111+
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap"
112+
rel="stylesheet"
113+
/>
114+
</head>
115+
116+
<body>
117+
<noscript> You need to enable JavaScript to run this app. </noscript>
118+
<div id="root">
119+
<div class="loader-container">
120+
<div class="loader">Loading...</div>
121+
</div>
122+
</div>
123+
</body>
124+
<script type="module" src="/src/index.tsx"></script>
125+
</html>

makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.PHONY: build help
2+
3+
help:
4+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
5+
6+
install: package.json ## install dependencies
7+
npm install;
8+
9+
start-supabase: ## start supabase locally
10+
npx supabase start
11+
12+
start-app: ## start the app locally
13+
npm run dev
14+
15+
start: start-supabase start-app ## start the stack locally
16+
17+
stop-supabase: ## stop local supabase
18+
npx supabase stop
19+
20+
stop: stop-supabase ## stop the stack locally
21+
22+
build: ## build the app
23+
npm run build

0 commit comments

Comments
 (0)