# UPDATED: Create IC App - Modern, unopinionated templates for all frameworks

**URL:** <https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589>\
**Category:** Developers\
**Created:** [April 24, 2021, 1:12pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589 "2021-04-24T13:12:42Z")\
**Posts on this page:** 18\
**Page:** 3

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [July 20, 2021, 2:09am UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/43 "2021-07-20T02:09:58Z")

</div>

I’m still finishing up my blog post, but here’s a draft of my explanation of the 0.7.7 changes and their rationale:

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [July 20, 2021, 4:12am UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/44 "2021-07-20T04:12:38Z")

</div>

That was super helpful! Looking forward to seeing all of it. I ran the copy task and got my folder.

Basically, it looks like the idl\_factory isn’t exposed from index.js any more, which was the issue. I was able to deduce how to use the exposed createActor method to pass in the options that I wanted.

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [July 20, 2021, 5:18am UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/45 "2021-07-20T05:18:35Z")

</div>

The environment variables are throwing me for a bit of a loop. Does dfx deploy --network ic flip the environment behind the scenes to production? Things worked before, but I’m not sure how. I think i just had my local and ic defined for each canister in .dfx/local/canister\_ids.json and things ‘just worked’. Now I’m at a bit of a loss. I see in webpack you have the initiateCanisterIds, but when I try to copy that over to my vite.config.js I always seem to get production values.

When I try to serve the dev version It seems to get the right values, but the app fails on export const canisterId = process.env.MY\_CANISTER\_ID; because the process doesn’t exist.

I guess I’ll hard code them for now. ☹

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [July 20, 2021, 5:57am UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/46 "2021-07-20T05:57:53Z")

</div>

Any reason you can’t expose the agent and idlFactory from index.js? I’d like to call fetchroot manually if I need to(I check window for localhost and call it if necessary since I can’t bend the environment variables to my will due to my inexperience with vite).

---

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [July 20, 2021, 6:14am UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/47 "2021-07-20T06:14:48Z")

</div>

The idlfactory is still available in the .did file, but we could export it from the index as well

---

<div class="post-metadata">

**Author:** ![Tbd](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/tbd/32/486_2.png) [@Tbd](https://forum.dfinity.org/u/Tbd)\
**Post date:** [July 20, 2021, 3:31pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/48 "2021-07-20T15:31:26Z")

</div>

Hey, Im gonna put some time on this today to see if I can get it working with the latest version.

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [July 20, 2021, 6:55pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/49 "2021-07-20T18:55:57Z")

</div>

I have it working with a few modifications…feel free to ping me if you get stuck. I basically just manually edited the index.js to expose the IDL and kept the method I was using to fetch the root for the agent and use a hard-coded set of canister IDs if I’m browsing localhost.

---

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [July 20, 2021, 7:08pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/50 "2021-07-20T19:08:03Z")

</div>

Checking back in - @skilesare I think you’d be interested in the [Minimal Update](https://kyle-peacock.com/blog/dfinity/dfx-0_7_7-changes#minimal-update) section I added to my blog post

---

<div class="post-metadata">

**Author:** ![Tbd](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/tbd/32/486_2.png) [@Tbd](https://forum.dfinity.org/u/Tbd)\
**Post date:** [July 22, 2021, 3:53pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/51 "2021-07-22T15:53:38Z")

</div>

I got it working for dev. Just need to spend some time on the env settings & making sure it works in prod seemlessly. But expect an update within next few days.

---

<div class="post-metadata">

**Author:** ![anthonymq](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/anthonymq/32/524_2.png) [@anthonymq](https://forum.dfinity.org/u/anthonymq)\
**Post date:** [July 29, 2021, 8:20am UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/52 "2021-07-29T08:20:42Z")

</div>

Hi @Tbd, thanks for the awesome template.  
I’m using Vue + vite and getting some trouble upgrading to 0.8.0, did you manage to do it ?  
I keep getting errors on the agent.fetchrootKey() call

---

<div class="post-metadata">

**Author:** ![Tbd](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/tbd/32/486_2.png) [@Tbd](https://forum.dfinity.org/u/Tbd)\
**Post date:** [September 14, 2021, 1:31pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/54 "2021-09-14T13:31:11Z")

</div>

Update is out! Check it out.

TLDR;

- Flattened dir structure
- Added auth example
- Updated look + consistent for all frameworks
- Upgraded to dfx 0.8.1
- Upgraded to all latest @dfinity/\* packages

> **[GitHub - MioQuispe/create-ic-app](https://github.com/MioQuispe/create-ic-app)**
>
> Contribute to MioQuispe/create-ic-app development by creating an account on GitHub.

 ![](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/7/7b3d188ab81572002357dd146df733d9799c93fe.png)

---

<div class="post-metadata">

**Author:** ![knkp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/knkp/32/4792_2.png) [@knkp](https://forum.dfinity.org/u/knkp)\
**Post date:** [March 28, 2022, 2:23pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/55 "2022-03-28T14:23:16Z")

</div>

@ferMartz @Tbd

Hey you guys thank you very much for your hard work on this tool.  
I’m just getting started with the IC and decided to try out the tailwindcss template for my first project. Which is a simple wordgame loosely inspired by wurdle. Local development went fine but after I deployed to the IC all of the formatting seems to have disappeared.

Here’s what the frontend looks like on localhost:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/3/31b50f5c4be976a160e632d3860e7c575be1cea8.png)

Here’s what it looks like after deploying to the IC:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/e/e198eb977d72436c19f1383bc4d1d96c1c52d34e.png)

My instinct’s tell me that `tailwind.config.js` is not being built into the canister when deployed to production. But I’m not certain.

Any advice is appreciated!

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [March 28, 2022, 3:06pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/56 "2022-03-28T15:06:44Z")

</div>

If you build your app locally (`npm run build` I guess) and try to serve locally (without IC) your bundle (I guess your `www`, or `dist` or `build` with `npx serve ...` for example), do you get your styling?

---

<div class="post-metadata">

**Author:** ![ferMartz](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/fermartz/32/1421_2.png) [@ferMartz](https://forum.dfinity.org/u/ferMartz)\
**Post date:** [March 28, 2022, 3:36pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/57 "2022-03-28T15:36:42Z")

</div>

I have not updated the tailwind template lately. If you are not set with tailwind this one works in prod like charm. It has Material UI. You can also upgrade to the latest Material UI if you like as well as latest DFX version.

Just clone this repo:

> **[GitHub - ferMartz/ic-firestarter: Modern starter for Internet Computer built...](https://github.com/ferMartz/ic-firestarter)**
>
> Modern starter for Internet Computer built with Create IC App + Vite + React + Material UI - GitHub - ferMartz/ic-firestarter: Modern starter for Internet Computer built with Create IC App + Vite +...

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/e/e9bc5bdcee52f1bcb17fae5700d7c16d41b1e2ef.png)

---

<div class="post-metadata">

**Author:** ![Tbd](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/tbd/32/486_2.png) [@Tbd](https://forum.dfinity.org/u/Tbd)\
**Post date:** [March 28, 2022, 8:37pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/58 "2022-03-28T20:37:19Z")

</div>

Hey! Yeah as @ferMartz mentioned its a bit outdated. I would suggest either use his project or take the default ones and add tailwind to them, it should be quite straightforward.

I’m cooking something new at the moment so hope to update these in the coming month or two if everything goes well.

---

<div class="post-metadata">

**Author:** ![knkp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/knkp/32/4792_2.png) [@knkp](https://forum.dfinity.org/u/knkp)\
**Post date:** [March 31, 2022, 4:36am UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/61 "2022-03-31T04:36:02Z")

</div>

> [@peterparker](#):
>
> do you get your styling?

Thanks for the insight, running `npm run serve` resulted in the same loss of formatting. Typically I use `npm run dev`. Now just gotta figure out why.

> [@ferMartz](#):
>
> I have not updated the tailwind template lately. If you are not set with tailwind this one works in prod like charm. It has Material UI. You can also upgrade to the latest Material UI if you like as well as latest DFX version.

Good to know - I’m starting a new one after this is live so I’ll look into it.

> [@Tbd](#):
>
> I’m cooking something new at the moment so hope to update these in the coming month or two if everything goes well.

Nice, looking forward too it

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [March 31, 2022, 5:59am UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/62 "2022-03-31T05:59:25Z")

</div>

> [@knkp](#):
>
> Thanks for the insight, running `npm run serve` resulted in the same loss of formatting. Typically I use `npm run dev` . Now just gotta figure out why.

Alright so indeed looks like you loose your styling when you do a productive build - i.e. the error does not sound related to the IC itself. Something with the tailwind or bundler configuration. I hope the sample repo that have been provided will help you track down the issue.

---

<div class="post-metadata">

**Author:** ![Tbd](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/tbd/32/486_2.png) [@Tbd](https://forum.dfinity.org/u/Tbd)\
**Post date:** [June 28, 2022, 4:38pm UTC](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589/63 "2022-06-28T16:38:19Z")

</div>

New create-ic-app version 0.2.0 is out!

Now supports all major wallets out of the box and takes care of authenticated canister calls (thanks to connect2ic).

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/3/36f17c0dbaf55336c8140cd8765555a521adef71.png)

Try it out with: `npm init ic-app@latest`

See demo video here:  
[https://twitter.com/miamaruq/status/1541822713064464385](https://twitter.com/miamaruq/status/1541822713064464385)

[Previous page](https://forum.dfinity.org/t/updated-create-ic-app-modern-unopinionated-templates-for-all-frameworks/2589.md?page=2)
